~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to libavformat/mpeg.c

  • Committer: Henrik Rydgård
  • Date: 2014-01-03 10:44:32 UTC
  • Revision ID: git-v1:87c6c126784b1718bfa448ecf2e6a9fef781eb4e
Update our ffmpeg snapshot to a clone of the official repository.

This is because Maxim's at3plus support has been officially merged!

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
    /* skip program_stream_info */
194
194
    avio_skip(pb, ps_info_length);
195
195
    es_map_length = avio_rb16(pb);
 
196
    /* Ignore es_map_length, trust psm_length */
 
197
    es_map_length = psm_length - ps_info_length - 10;
196
198
 
197
199
    /* at least one es available? */
198
200
    while (es_map_length >= 4){
521
523
        codec_id = AV_CODEC_ID_DVD_NAV;
522
524
    } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
523
525
        type = AVMEDIA_TYPE_AUDIO;
524
 
        codec_id = m->sofdec > 0 ? AV_CODEC_ID_ADPCM_ADX : AV_CODEC_ID_MP2;
 
526
        if (m->sofdec > 0) {
 
527
            codec_id = AV_CODEC_ID_ADPCM_ADX;
 
528
            // Auto-detect AC-3
 
529
            request_probe = 50;
 
530
        } else {
 
531
            codec_id = AV_CODEC_ID_MP2;
 
532
        }
525
533
    } else if (startcode >= 0x80 && startcode <= 0x87) {
526
534
        type = AVMEDIA_TYPE_AUDIO;
527
535
        codec_id = AV_CODEC_ID_AC3;
916
924
        return ret;
917
925
    }
918
926
 
 
927
    if (stream_index == -1) // only 1 stream
 
928
        stream_index = 0;
919
929
    return ff_subtitles_queue_seek(&vobsub->q[stream_index], s, stream_index,
920
930
                                   min_ts, ts, max_ts, flags);
921
931
}