summaryrefslogtreecommitdiff
path: root/ext/libav/gstavviddec.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-06-27 20:15:20 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-06-28 12:41:55 +0200
commit982f5262d44ac42c5a2f0ed07446875424900a76 (patch)
tree0c9978d55141479ed45bac3e7e8270b66d51fa82 /ext/libav/gstavviddec.c
parent0767bdda5f111aecc4b462c04f78a60a229d0ed9 (diff)
downloadgst-libav-982f5262d44ac42c5a2f0ed07446875424900a76.tar.gz
avviddec: Use undeprecated AVFrame API and unref frame once we're done with it
Diffstat (limited to 'ext/libav/gstavviddec.c')
-rw-r--r--ext/libav/gstavviddec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index ffc6df8..79533d5 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -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!
*/