[FFmpeg-cvslog] segafilm: make the loop condition in film_read_packet() match the contents.
Michael Niedermayer
git at videolan.org
Mon Apr 16 02:23:52 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 16 01:24:04 2012 +0200| [6d24fe2c3c7437bfbf8317d3de5bdd4af9823589] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d24fe2c3c7437bfbf8317d3de5bdd4af9823589
---
libavformat/segafilm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index c0a5e0f..9c171f0 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++];
More information about the ffmpeg-cvslog
mailing list