diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index 042c110953..d5dc37daae 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 00feafc33a..b1ecb7ed3b 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; }