vaapi: filter out DELAYED_PIC_REF flag to determine field.
authorGwenole Beauchesne <git@videolan.org>
Tue, 29 Mar 2011 09:07:29 +0000 (11:07 +0200)
committerReinhard Tartler <siretart@tauware.de>
Sat, 9 Apr 2011 10:00:57 +0000 (12:00 +0200)
This fixes ticket #23.

(cherry picked from commit 621f4c98df4ee9fd604a614f31e09eef9dd7d3ca)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/vaapi_h264.c

index f94e679..805e4ef 100644 (file)
@@ -55,6 +55,7 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic,
 {
     if (pic_structure == 0)
         pic_structure = pic->reference;
+    pic_structure &= PICT_FRAME; /* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */
 
     va_pic->picture_id = ff_vaapi_get_surface_id(pic);
     va_pic->frame_idx  = pic->long_ref ? pic->pic_id : pic->frame_num;