~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to libavformat/diracdec.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:
25
25
 
26
26
static int dirac_probe(AVProbeData *p)
27
27
{
28
 
    if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D'))
29
 
        return AVPROBE_SCORE_MAX;
30
 
    else
31
 
        return 0;
 
28
    unsigned size;
 
29
    if (AV_RL32(p->buf) != MKTAG('B', 'B', 'C', 'D'))
 
30
        return 0;
 
31
 
 
32
    size = AV_RB32(p->buf+5);
 
33
    if (size < 13)
 
34
        return 0;
 
35
    if (size + 13LL > p->buf_size)
 
36
        return AVPROBE_SCORE_MAX / 4;
 
37
    if (AV_RL32(p->buf + size) != MKTAG('B', 'B', 'C', 'D'))
 
38
        return 0;
 
39
 
 
40
    return AVPROBE_SCORE_MAX;
32
41
}
33
42
 
34
43
FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, AV_CODEC_ID_DIRAC)