aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2005-02-04 03:38:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-02-04 03:38:33 +0000
commit3a615bb548550d10fd81750c1a23b7d9ccd10bfa (patch)
treec4803e7462e03c4a9aa5201f32b65d66da40043c /libavformat
parent9a0a8d420dced4ca856615e3685aadb3841aedaf (diff)
downloadffmpeg-3a615bb548550d10fd81750c1a23b7d9ccd10bfa.tar.gz
VMD playing error patch by (Kostya (cannonball bw-team com>)
"I recently got a game called Lighthouse from Sierra with FMV in VMD format. Some of them played OK, some of them FFmpeg refused to open, some caused a crash. I investigated files which couldn't be opened by FFmpeg and it appeared that they had no audio (and bytes 2-3 from beginning of file contained 01 00, all other have 00 00 insted). Attached patch fixes this issue." Originally committed as revision 3934 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/sierravmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index 0e268cb02c..16b6a8d4cc 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -185,7 +185,8 @@ static int vmd_read_header(AVFormatContext *s,
/* each on-disk VMD frame has an audio part and a video part; demuxer
* accounts them separately */
- vmd->frame_count *= 2;
+ if(vmd->sample_rate)
+ vmd->frame_count *= 2;
raw_frame_table = NULL;
vmd->frame_table = NULL;
raw_frame_table_size = vmd->frame_count * BYTES_PER_FRAME_RECORD;