Fix decoding of some H.264 streams. e.g. Ice Age 2 trailer.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Mon, 14 Jun 2010 14:14:42 +0000 (14:14 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:47 +0000 (12:55 +0200)
NEWS
gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c

diff --git a/NEWS b/NEWS
index 18299ca..6af3779 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Copyright (C) 2010 Splitted-Desktop Systems
 
 Version 0.2.4 - DD.May.2010
 * Fix build with older VA-API 0.29-sds
+* Fix decoding of some H.264 streams. e.g. Ice Age 2 trailer
 * Fix video rendering rect within an embedder window (Totem)
 * Disable GLX rendering when vaapisink uses a foreign X window
 
index b94a02a..d6fe7e2 100644 (file)
@@ -478,10 +478,10 @@ decode_frame(GstVaapiDecoderFfmpeg *ffdecoder, guchar *buf, guint buf_size)
         buf, buf_size
     );
     GST_VAAPI_DISPLAY_UNLOCK(display);
-    if (bytes_read < 0)
-        return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
     if (!got_picture)
         return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
+    if (bytes_read < 0)
+        return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
 
     surface = gst_vaapi_context_find_surface_by_id(
         GST_VAAPI_DECODER_CONTEXT(ffdecoder),