From: Gwenole Beauchesne Date: Tue, 22 Jan 2013 15:03:18 +0000 (+0100) Subject: vc1: implement flush() hook. X-Git-Tag: 1.19.3~503^2~2735 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec3c4576c025b6a5d3aacd69ac0dd4e97db0b7fd;p=platform%2Fupstream%2Fgstreamer.git vc1: implement flush() hook. Make it a simple DPB flush. --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c index 3fe8a9799c..b746bea1c9 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c @@ -1274,6 +1274,16 @@ gst_vaapi_decoder_vc1_end_frame(GstVaapiDecoder *base_decoder) return decode_current_picture(decoder); } +static GstVaapiDecoderStatus +gst_vaapi_decoder_vc1_flush(GstVaapiDecoder *base_decoder) +{ + GstVaapiDecoderVC1 * const decoder = GST_VAAPI_DECODER_VC1(base_decoder); + GstVaapiDecoderVC1Private * const priv = decoder->priv; + + gst_vaapi_dpb_flush(priv->dpb); + return GST_VAAPI_DECODER_STATUS_SUCCESS; +} + static void gst_vaapi_decoder_vc1_finalize(GObject *object) { @@ -1313,6 +1323,7 @@ gst_vaapi_decoder_vc1_class_init(GstVaapiDecoderVC1Class *klass) decoder_class->decode = gst_vaapi_decoder_vc1_decode; decoder_class->start_frame = gst_vaapi_decoder_vc1_start_frame; decoder_class->end_frame = gst_vaapi_decoder_vc1_end_frame; + decoder_class->flush = gst_vaapi_decoder_vc1_flush; } static void