From: gb Date: Thu, 29 Apr 2010 14:58:45 +0000 (+0000) Subject: Fix gst_vaapi_decoder_get_surface() status. X-Git-Tag: accepted/trunk/20120822.173359~499 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0596777703279c4aa5edb3da0d011440ce7ca84b;p=profile%2Fivi%2Fgstreamer-vaapi.git Fix gst_vaapi_decoder_get_surface() status. --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 6ad1c9d..97657fc 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -221,7 +221,6 @@ static gboolean push_surface(GstVaapiDecoder *decoder, GstVaapiSurface *surface) { GstVaapiDecoderPrivate * const priv = decoder->priv; - GstVaapiDecoderStatus status = priv->decoder_status; DecodedSurface *ds; ds = create_surface(); @@ -232,13 +231,16 @@ push_surface(GstVaapiDecoder *decoder, GstVaapiSurface *surface) GST_DEBUG("queue decoded surface %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(GST_VAAPI_OBJECT_ID(surface))); ds->proxy = gst_vaapi_surface_proxy_new(priv->context, surface); - if (ds->proxy) + if (ds->proxy) { + ds->status = GST_VAAPI_DECODER_STATUS_SUCCESS; gst_vaapi_surface_proxy_set_timestamp( ds->proxy, priv->surface_timestamp); + } else - status = GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; + ds->status = GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; } - ds->status = status; + else + ds->status = priv->decoder_status; g_async_queue_push(priv->surfaces, ds); return TRUE;