Revision 0e635f3e libavformat/sierravmd.c

View differences:

libavformat/sierravmd.c
99 99
    if (avio_read(pb, vmd->vmd_header, VMD_HEADER_SIZE) != VMD_HEADER_SIZE)
100 100
        return AVERROR(EIO);
101 101

  
102
    if(vmd->vmd_header[16] == 'i' && vmd->vmd_header[17] == 'v' && vmd->vmd_header[18] == '3')
102
    if(vmd->vmd_header[24] == 'i' && vmd->vmd_header[25] == 'v' && vmd->vmd_header[26] == '3')
103 103
        vmd->is_indeo3 = 1;
104 104
    else
105 105
        vmd->is_indeo3 = 0;
......
249 249
        return AVERROR(ENOMEM);
250 250
    pkt->pos= avio_tell(pb);
251 251
    memcpy(pkt->data, frame->frame_record, BYTES_PER_FRAME_RECORD);
252
    if(vmd->is_indeo3)
252
    if(vmd->is_indeo3 && frame->frame_record[0] == 0x02)
253 253
        ret = avio_read(pb, pkt->data, frame->frame_size);
254 254
    else
255 255
        ret = avio_read(pb, pkt->data + BYTES_PER_FRAME_RECORD,

Also available in: Unified diff