Click here to Skip to main content
15,905,867 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen13-Jun-06 20:59
Cedric Moonen13-Jun-06 20:59 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP13-Jun-06 21:09
RahulOP13-Jun-06 21:09 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen13-Jun-06 21:24
Cedric Moonen13-Jun-06 21:24 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP13-Jun-06 21:41
RahulOP13-Jun-06 21:41 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen13-Jun-06 21:50
Cedric Moonen13-Jun-06 21:50 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Eytukan13-Jun-06 22:11
Eytukan13-Jun-06 22:11 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP13-Jun-06 22:22
RahulOP13-Jun-06 22:22 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP13-Jun-06 22:16
RahulOP13-Jun-06 22:16 
Quoting from the apiexample.c
AVCodec *codec;<br />
    AVCodecContext *c= NULL;<br />
    int frame_size, i, j, out_size, outbuf_size;<br />
    FILE *f;<br />
    short *samples;<br />
    float t, tincr;<br />
    uint8_t *outbuf;<br />
    /* find the MP2 encoder */<br />
    codec = avcodec_find_encoder(CODEC_ID_MP2);<br />
    c= avcodec_alloc_context();<br />
        /* put sample parameters */<br />
    c->bit_rate = 64000;<br />
    c->sample_rate = 44100;<br />
    c->channels = 2;

This is what I am trying to re-write.

This is how alloc_code_context is defined in the .h file
AVCodecContext *avcodec_alloc_context(void);


D'Oh! | :doh: I just tried this
typedef AVCodecContext*(avcodec_alloc_context)(); and I didnt have any errors.It ran perfectly.
Though yes, there is something about memory leaks.Thank you so much for the heads-up
GeneralRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen13-Jun-06 22:27
Cedric Moonen13-Jun-06 22:27 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP13-Jun-06 22:39
RahulOP13-Jun-06 22:39 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen13-Jun-06 23:14
Cedric Moonen13-Jun-06 23:14 
GeneralRe: Error when using libavcodec dll in vc++ [modified] Pin
RahulOP13-Jun-06 23:29
RahulOP13-Jun-06 23:29 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP14-Jun-06 21:00
RahulOP14-Jun-06 21:00 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Cedric Moonen15-Jun-06 1:24
Cedric Moonen15-Jun-06 1:24 
GeneralRe: Error when using libavcodec dll in vc++ Pin
RahulOP15-Jun-06 2:53
RahulOP15-Jun-06 2:53 
GeneralRe: Error when using libavcodec dll in vc++ Pin
Eytukan13-Jun-06 22:27
Eytukan13-Jun-06 22:27 
AnswerRe: Error when using libavcodec dll in vc++ Pin
Viorel.13-Jun-06 21:00
Viorel.13-Jun-06 21:00 
AnswerRe: Error when using libavcodec dll in vc++ Pin
Eytukan13-Jun-06 22:01
Eytukan13-Jun-06 22:01 
Question[Message Deleted] Pin
angelfirefox13-Jun-06 20:07
angelfirefox13-Jun-06 20:07 
AnswerRe: CTreeCtrl Height bright Display Pin
Sarath C13-Jun-06 20:35
Sarath C13-Jun-06 20:35 
AnswerRe: CTreeCtrl Height bright Display Pin
Hamid_RT13-Jun-06 20:47
Hamid_RT13-Jun-06 20:47 
QuestionRe: [Message Deleted] Pin
toxcct13-Jun-06 22:24
toxcct13-Jun-06 22:24 
AnswerRe: [Message Deleted] Pin
ThatsAlok13-Jun-06 22:44
ThatsAlok13-Jun-06 22:44 
QuestionCRichEditCtrl show gif [modified] Pin
chybin13-Jun-06 20:03
chybin13-Jun-06 20:03 
QuestionSet beginning of file? Pin
_johan13-Jun-06 20:02
_johan13-Jun-06 20:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.