media/libtheora/bug498815.patch
author Taras Glek <tglek@mozilla.com>
Sat, 08 Aug 2009 12:07:39 +0200
changeset 31243 ff9eba3f82245af4bbee39ba022725e8ed3998ce
parent 29341 c5e23f5c7e7bb8bf79e2e25a4e4b0eff1cbe9b05
permissions -rw-r--r--
Bug 504864 - mmap io for JARs; r=benjamin

Index: decinfo.c
===================================================================
--- decinfo.c   (revision 16127)
+++ decinfo.c   (working copy)
@@ -70,12 +70,8 @@
   _info->pic_height=(ogg_uint32_t)val;
   theorapackB_read(_opb,8,&val);
   _info->pic_x=(ogg_uint32_t)val;
-  /*Note: The sense of pic_y is inverted in what we pass back to the
-     application compared to how it is stored in the bitstream.
-    This is because the bitstream uses a right-handed coordinate system, while
-     applications expect a left-handed one.*/
   theorapackB_read(_opb,8,&val);
-  _info->pic_y=_info->frame_height-_info->pic_height-(ogg_uint32_t)val;
+  _info->pic_y=(ogg_uint32_t)val;
   theorapackB_read(_opb,32,&val);
   _info->fps_numerator=(ogg_uint32_t)val;
   theorapackB_read(_opb,32,&val);
@@ -86,6 +82,11 @@
    _info->fps_numerator==0||_info->fps_denominator==0){
     return TH_EBADHEADER;
   }
+  /*Note: The sense of pic_y is inverted in what we pass back to the
+     application compared to how it is stored in the bitstream.
+    This is because the bitstream uses a right-handed coordinate system, while
+     applications expect a left-handed one.*/
+  _info->pic_y=_info->frame_height-_info->pic_height-_info->pic_y;
   theorapackB_read(_opb,24,&val);
   _info->aspect_numerator=(ogg_uint32_t)val;
   theorapackB_read(_opb,24,&val);