aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/sierravmd.c
diff options
context:
space:
mode:
authorMatthew Hoops <clone2727@gmail.com>2011-03-31 10:42:22 -0400
committerAnton Khirnov <anton@khirnov.net>2011-04-01 19:29:08 +0200
commit0e635f3e86956bd85896831f3c7e6dfaef97bf7d (patch)
tree0494206c295d6f69b88bdaabd4152e28b17bcb5c /libavformat/sierravmd.c
parent41327cca613e52a3030b0f133b38bcddff05243c (diff)
downloadffmpeg-0e635f3e86956bd85896831f3c7e6dfaef97bf7d.tar.gz
sierravmd: fix Indeo3 videos
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/sierravmd.c')
-rw-r--r--libavformat/sierravmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index c43d6ee93a..c0fb22211b 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -99,7 +99,7 @@ static int vmd_read_header(AVFormatContext *s,
if (avio_read(pb, vmd->vmd_header, VMD_HEADER_SIZE) != VMD_HEADER_SIZE)
return AVERROR(EIO);
- if(vmd->vmd_header[16] == 'i' && vmd->vmd_header[17] == 'v' && vmd->vmd_header[18] == '3')
+ if(vmd->vmd_header[24] == 'i' && vmd->vmd_header[25] == 'v' && vmd->vmd_header[26] == '3')
vmd->is_indeo3 = 1;
else
vmd->is_indeo3 = 0;
@@ -249,7 +249,7 @@ static int vmd_read_packet(AVFormatContext *s,
return AVERROR(ENOMEM);
pkt->pos= avio_tell(pb);
memcpy(pkt->data, frame->frame_record, BYTES_PER_FRAME_RECORD);
- if(vmd->is_indeo3)
+ if(vmd->is_indeo3 && frame->frame_record[0] == 0x02)
ret = avio_read(pb, pkt->data, frame->frame_size);
else
ret = avio_read(pb, pkt->data + BYTES_PER_FRAME_RECORD,