On Sat, Jul 11, 2015 at 05:24:02PM +0000, Lectem wrote: > If I understood the source and documentation correctly, avcodec_free_context > should now be used to free a context instead of avcodec_close + av_free. > --- > doc/examples/decoding_encoding.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/doc/examples/decoding_encoding.c > b/doc/examples/decoding_encoding.c > index f6643f6..e257501 100644 > --- a/doc/examples/decoding_encoding.c > +++ b/doc/examples/decoding_encoding.c > @@ -232,8 +232,7 @@ static void audio_encode_example(const char *filename) > > av_freep(&samples); > av_frame_free(&frame); > - avcodec_close(c); > - av_free(c); > + avcodec_free_context(c);
avcodec_close takes a AVCodecContext pointer avcodec_free_context takes a AVCodecContext pointer to pointer make sure you test code before submitting it, make sure you correct every new compiler warning [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel