mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-16 05:16:36 +00:00
avviddec: Use undeprecated AVFrame API and unref frame once we're done with it
This commit is contained in:
parent
0767bdda5f
commit
982f5262d4
1 changed files with 4 additions and 2 deletions
|
@ -261,7 +261,7 @@ gst_ffmpegviddec_init (GstFFMpegVidDec * ffmpegdec)
|
|||
/* some ffmpeg data */
|
||||
ffmpegdec->context = avcodec_alloc_context3 (klass->in_plugin);
|
||||
ffmpegdec->context->opaque = ffmpegdec;
|
||||
ffmpegdec->picture = avcodec_alloc_frame ();
|
||||
ffmpegdec->picture = av_frame_alloc ();
|
||||
ffmpegdec->opened = FALSE;
|
||||
ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
|
||||
ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
|
||||
|
@ -283,7 +283,7 @@ gst_ffmpegviddec_finalize (GObject * object)
|
|||
ffmpegdec->context = NULL;
|
||||
}
|
||||
|
||||
avcodec_free_frame (&ffmpegdec->picture);
|
||||
av_frame_free (&ffmpegdec->picture);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
@ -1350,6 +1350,8 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
|||
g_list_free (ol);
|
||||
}
|
||||
|
||||
av_frame_unref (ffmpegdec->picture);
|
||||
|
||||
/* FIXME: Ideally we would remap the buffer read-only now before pushing but
|
||||
* libav might still have a reference to it!
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue