diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-15 15:51:52 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-15 15:51:52 +0200 |
commit | ae946bab1cb495e8f9423e6623e5adf7b6fe1ec1 (patch) | |
tree | 55c886f0088c740b32c6ff44474b52848fa480bb | |
parent | 3d628e567635de6eb8d9ca366865dcb317f53e20 (diff) |
libav: Use new flush vfunc of video codec base classes and remove reset implementations
-rw-r--r-- | ext/libav/gstavviddec.c | 10 | ||||
-rw-r--r-- | ext/libav/gstavvidenc.c | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index 042c110..d5dc37d 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -69,8 +69,7 @@ static gboolean gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, static GstFlowReturn gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame); static gboolean gst_ffmpegviddec_stop (GstVideoDecoder * decoder); -static gboolean gst_ffmpegviddec_reset (GstVideoDecoder * decoder, - gboolean hard); +static gboolean gst_ffmpegviddec_flush (GstVideoDecoder * decoder); static gboolean gst_ffmpegviddec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query); static gboolean gst_ffmpegviddec_propose_allocation (GstVideoDecoder * decoder, @@ -236,7 +235,7 @@ gst_ffmpegviddec_class_init (GstFFMpegVidDecClass * klass) viddec_class->set_format = gst_ffmpegviddec_set_format; viddec_class->handle_frame = gst_ffmpegviddec_handle_frame; viddec_class->stop = gst_ffmpegviddec_stop; - viddec_class->reset = gst_ffmpegviddec_reset; + viddec_class->flush = gst_ffmpegviddec_flush; viddec_class->finish = gst_ffmpegviddec_finish; viddec_class->decide_allocation = gst_ffmpegviddec_decide_allocation; viddec_class->propose_allocation = gst_ffmpegviddec_propose_allocation; @@ -1437,13 +1436,12 @@ gst_ffmpegviddec_finish (GstVideoDecoder * decoder) } static gboolean -gst_ffmpegviddec_reset (GstVideoDecoder * decoder, gboolean hard) +gst_ffmpegviddec_flush (GstVideoDecoder * decoder) { GstFFMpegVidDec *ffmpegdec = (GstFFMpegVidDec *) decoder; - if (ffmpegdec->opened) { + if (ffmpegdec->opened) avcodec_flush_buffers (ffmpegdec->context); - } return TRUE; } diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c index 00feafc..b1ecb7e 100644 --- a/ext/libav/gstavvidenc.c +++ b/ext/libav/gstavvidenc.c @@ -98,8 +98,7 @@ static gboolean gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state); static gboolean gst_ffmpegvidenc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query); -static gboolean gst_ffmpegvidenc_reset (GstVideoEncoder * encoder, - gboolean hard); +static gboolean gst_ffmpegvidenc_flush (GstVideoEncoder * encoder); static GstCaps *gst_ffmpegvidenc_getcaps (GstVideoEncoder * encoder, GstCaps * filter); @@ -215,7 +214,7 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) venc_class->getcaps = gst_ffmpegvidenc_getcaps; venc_class->set_format = gst_ffmpegvidenc_set_format; venc_class->propose_allocation = gst_ffmpegvidenc_propose_allocation; - venc_class->reset = gst_ffmpegvidenc_reset; + venc_class->flush = gst_ffmpegvidenc_flush; gobject_class->finalize = gst_ffmpegvidenc_finalize; } @@ -782,13 +781,12 @@ gst_ffmpegvidenc_get_property (GObject * object, } static gboolean -gst_ffmpegvidenc_reset (GstVideoEncoder * encoder, gboolean hard) +gst_ffmpegvidenc_flush (GstVideoEncoder * encoder) { GstFFMpegVidEnc *ffmpegenc = (GstFFMpegVidEnc *) encoder; - if (ffmpegenc->opened) { + if (ffmpegenc->opened) avcodec_flush_buffers (ffmpegenc->context); - } return TRUE; } |