lavc: Add device context field to AVCodecContext

For use by codec implementations which can allocate frames internally.
This commit is contained in:
Mark Thompson
2017-02-09 00:23:36 +00:00
parent aa234698e9
commit c1a5fca06f
4 changed files with 28 additions and 2 deletions

View File

@@ -3067,6 +3067,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->nb_coded_side_data = 0;
av_buffer_unref(&avctx->hw_frames_ctx);
av_buffer_unref(&avctx->hw_device_ctx);
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
av_opt_free(avctx->priv_data);