[xiph-commits] r16143 - branches/theora-thusnelda/lib/dec
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Tue Jun 16 22:12:50 PDT 2009
Author: tterribe
Date: 2009-06-16 22:12:49 -0700 (Tue, 16 Jun 2009)
New Revision: 16143
Modified:
branches/theora-thusnelda/lib/dec/decinfo.c
Log:
Flip the sense of pic_y after we check for validity, not before.
Otherwise we're checking frame_height-pic_y>frame_height, which is never true.
Modified: branches/theora-thusnelda/lib/dec/decinfo.c
===================================================================
--- branches/theora-thusnelda/lib/dec/decinfo.c 2009-06-15 20:35:35 UTC (rev 16142)
+++ branches/theora-thusnelda/lib/dec/decinfo.c 2009-06-17 05:12:49 UTC (rev 16143)
@@ -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);
More information about the commits
mailing list