diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 01:24:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 02:18:09 +0200 |
commit | 6d24fe2c3c7437bfbf8317d3de5bdd4af9823589 (patch) | |
tree | d121bc3cdfa5ecd1e95811b863f59f0136f1841c /libavformat/segafilm.c | |
parent | ed66bbfcb95f52470d32c363a02d5ee4bf940c1c (diff) | |
download | ffmpeg-6d24fe2c3c7437bfbf8317d3de5bdd4af9823589.tar.gz |
segafilm: make the loop condition in film_read_packet() match the contents.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r-- | libavformat/segafilm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index c0a5e0f81e..9c171f0b50 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -290,7 +290,7 @@ static int film_read_packet(AVFormatContext *s, left = 0; right = sample->sample_size / 2; - for (i = 0; i < sample->sample_size; ) { + for (i = 0; i + 1 + 2*(film->audio_bits != 8) < sample->sample_size; ) { if (film->audio_bits == 8) { pkt->data[i++] = film->stereo_buffer[left++]; pkt->data[i++] = film->stereo_buffer[right++]; |