On 23 August 2017 at 12:21, Dafna Hirschfeld <[email protected]> wrote:
> I use the ffmpeg api to decode video.
> After allocating and opening a *AvCodecContext* with *avcodec_open2*,
> then when decoding finishes, is it valid to call just
> *avcodec_flush_buffers* and *avcodec_free_context* without calling
> *avcodec_close* ?
>
> thanks
> Dafna
>
Hi Dafna,
*avcodec_free_context* actually does this:
void avcodec_free_context(AVCodecContext **pavctx)
{
AVCodecContext *avctx = *pavctx;
if (!avctx)
return;
*avcodec_close(avctx);*
av_freep(&avctx->extradata);
av_freep(&avctx->subtitle_header);
av_freep(&avctx->intra_matrix);
av_freep(&avctx->inter_matrix);
av_freep(&avctx->rc_override);
av_freep(pavctx);
}
>From what I know *avcodec_close* should not be used anymore in the latest
ffmpeg versions.
Jaka
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user