1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-18 23:35:06 +02:00

theora: Skip zero-sized headers

This fixes a regression since d9cf5f51 with theora over RTP
(possibly with other variants of theora as well).

In theora over RTP, the second of the 3 headers turns out to be
0 bytes long, which prior to d9cf5f51 worked just fine. After
d9cf5f51, reading from the bitstream reader fails (since the reader
wasn't initialized but returned an error if initialized with 0 bits).

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-01-17 16:03:36 +02:00
parent b805c725a3
commit e33db35b4a

View File

@ -2339,6 +2339,8 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
}
for(i=0;i<3;i++) {
if (header_len[i] <= 0)
continue;
init_get_bits(&gb, header_start[i], header_len[i] * 8);
ptype = get_bits(&gb, 8);