mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
libav: Use new flush vfunc of video codec base classes and remove reset implementations
This commit is contained in:
parent
3d628e5676
commit
ae946bab1c
2 changed files with 8 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue