vl/mpeg2: simple fix to get xine running again
authorChristian König <deathsimple@vodafone.de>
Wed, 4 Jan 2012 14:59:29 +0000 (15:59 +0100)
committerChristian König <deathsimple@vodafone.de>
Wed, 4 Jan 2012 15:01:09 +0000 (16:01 +0100)
Otherwise xines xxmc plugin will just display green blocks.

Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/auxiliary/vl/vl_mpeg12_decoder.c

index 04253ef..1426eb8 100644 (file)
@@ -260,12 +260,13 @@ MacroBlockTypeToPipeWeights(const struct pipe_mpeg12_macroblock *mb, unsigned we
       break;
 
    default:
-      if (mb->macroblock_type & PIPE_MPEG12_MB_TYPE_PATTERN) {
-         /* patern without a motion vector, just copy the old frame content */
-         weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX;
+      if (mb->macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA) {
+         weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN;
          weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN;
       } else {
-         weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN;
+         /* no motion vector, but also not intra mb ->
+            just copy the old frame content */
+         weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX;
          weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN;
       }
       break;