Ticket #1557: patchreal.diff

File patchreal.diff, 807 bytes (added by cehoyos, 4 years ago)
  • libavformat/rmdec.c

    diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
    index 2bfa5ce..c531339 100644
    a b static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, 
    196196            st->need_parsing = AVSTREAM_PARSE_HEADERS; 
    197197        case AV_CODEC_ID_ATRAC3: 
    198198        case AV_CODEC_ID_SIPR: 
     199            if (read_all) { 
     200                codecdata_length = 0; 
     201            } else { 
    199202            avio_rb16(pb); avio_r8(pb); 
    200203            if (version == 5) 
    201204                avio_r8(pb); 
    202205            codecdata_length = avio_rb32(pb); 
     206            } 
    203207            if(codecdata_length + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){ 
    204208                av_log(s, AV_LOG_ERROR, "codecdata_length too large\n"); 
    205209                return -1;