[MPlayer-dev-eng] [PATCH]Fix ffodivxvdpau with elementary streams and the native demuxer

Carl Eugen Hoyos cehoyos at rainbow.studorg.tuwien.ac.at
Sat Mar 13 01:06:24 CET 2010


Hi!

Could somebody comment on the first lines (to be applied separately and 
together with the last) of the patch?

Carl Eugen
-------------- next part --------------
Index: libmpdemux/video.c
===================================================================
--- libmpdemux/video.c	(revision 30881)
+++ libmpdemux/video.c	(working copy)
@@ -169,6 +169,8 @@
      return 0;
    }
    mp4_header_process_vop(&picture, &(videobuffer[pos]));
+   sh_video->disp_w = picture.display_picture_width;
+   sh_video->disp_h = picture.display_picture_height;
    units[vop_cnt] = picture.timeinc_unit;
    vop_cnt++;
    //mp_msg(MSGT_DECVIDEO,MSGL_V, "TYPE: %d, unit: %d\n", picture.picture_type, picture.timeinc_unit);
Index: libmpdemux/mpeg_hdr.c
===================================================================
--- libmpdemux/mpeg_hdr.c	(revision 30881)
+++ libmpdemux/mpeg_hdr.c	(working copy)
@@ -251,14 +251,20 @@
 
     n++; //marker bit
 
-    if(getbits(buffer, n, 1)) {	//fixed_vop_timeinc
-      n++;
-      n = read_timeinc(picture, buffer, n);
+    if(getbits(buffer, n++, 1)) {	//fixed_vop_timeinc
+      n += read_timeinc(picture, buffer, n);
 
       if(picture->timeinc_unit)
         picture->fps = (float) picture->timeinc_resolution / (float) picture->timeinc_unit;
     }
 
+    n++; //marker bit
+    picture->display_picture_width = getbits16(buffer, n, 13);
+    n += 13;
+    n++; //marker bit
+    picture->display_picture_height = getbits16(buffer, n, 13);
+    n += 13;
+
     //fprintf(stderr, "ASPECT: %d, PARW=%d, PARH=%d, TIMEINCRESOLUTION: %d, FIXED_TIMEINC: %d (number of bits: %d), FPS: %u\n",
     //	aspect, aspectw, aspecth, picture->timeinc_resolution, picture->timeinc_unit, picture->timeinc_bits, picture->fps);
 
@@ -276,7 +282,7 @@
   n++;
   getbits(buffer, n, 1);
   n++;
-  n = read_timeinc(picture, buffer, n);
+  n += read_timeinc(picture, buffer, n);
 }
 
 #define min(a, b) ((a) <= (b) ? (a) : (b))


More information about the MPlayer-dev-eng mailing list