1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fix playback of theora.ogg on mphq patch by (matthieu castet %% castet dat matthieu ot free dat fr %%)

Originally committed as revision 5776 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Matthieu Castet 2006-07-17 10:44:53 +00:00 committed by Michael Niedermayer
parent ae1dd8e125
commit 116d866ca5
2 changed files with 5 additions and 1 deletions

View File

@ -2628,8 +2628,10 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
skip_bits(gb, 24); /* frame height */ skip_bits(gb, 24); /* frame height */
} }
if (s->theora >= 0x030200) {
skip_bits(gb, 8); /* offset x */ skip_bits(gb, 8); /* offset x */
skip_bits(gb, 8); /* offset y */ skip_bits(gb, 8); /* offset y */
}
skip_bits(gb, 32); /* fps numerator */ skip_bits(gb, 32); /* fps numerator */
skip_bits(gb, 32); /* fps denumerator */ skip_bits(gb, 32); /* fps denumerator */
@ -2818,6 +2820,8 @@ static int theora_decode_init(AVCodecContext *avctx)
} }
if(8*op_bytes != get_bits_count(&gb)) if(8*op_bytes != get_bits_count(&gb))
av_log(avctx, AV_LOG_ERROR, "%d bits left in packet %X\n", 8*op_bytes - get_bits_count(&gb), ptype); av_log(avctx, AV_LOG_ERROR, "%d bits left in packet %X\n", 8*op_bytes - get_bits_count(&gb), ptype);
if (s->theora < 0x030200)
break;
} }
vp3_decode_init(avctx); vp3_decode_init(avctx);

View File

@ -75,7 +75,7 @@ theora_header (AVFormatContext * s, int idx)
if (version >= 0x030400) if (version >= 0x030400)
skip_bits(&gb, 164); skip_bits(&gb, 164);
else else if (version >= 0x030200)
skip_bits(&gb, 64); skip_bits(&gb, 64);
st->codec->time_base.den = get_bits(&gb, 32); st->codec->time_base.den = get_bits(&gb, 32);
st->codec->time_base.num = get_bits(&gb, 32); st->codec->time_base.num = get_bits(&gb, 32);