~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to libavformat/iss.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:
76
76
 
77
77
    get_token(pb, token, sizeof(token)); //"IMA_ADPCM_Sound"
78
78
    get_token(pb, token, sizeof(token)); //packet size
79
 
    sscanf(token, "%d", &iss->packet_size);
 
79
    if (sscanf(token, "%d", &iss->packet_size) != 1) {
 
80
        av_log(s, AV_LOG_ERROR, "Failed parsing packet size\n");
 
81
        return AVERROR_INVALIDDATA;
 
82
    }
80
83
    get_token(pb, token, sizeof(token)); //File ID
81
84
    get_token(pb, token, sizeof(token)); //out size
82
85
    get_token(pb, token, sizeof(token)); //stereo
83
 
    sscanf(token, "%d", &stereo);
 
86
    if (sscanf(token, "%d", &stereo) != 1) {
 
87
        av_log(s, AV_LOG_ERROR, "Failed parsing stereo flag\n");
 
88
        return AVERROR_INVALIDDATA;
 
89
    }
84
90
    get_token(pb, token, sizeof(token)); //Unknown1
85
91
    get_token(pb, token, sizeof(token)); //RateDivisor
86
 
    sscanf(token, "%d", &rate_divisor);
 
92
    if (sscanf(token, "%d", &rate_divisor) != 1) {
 
93
        av_log(s, AV_LOG_ERROR, "Failed parsing rate_divisor\n");
 
94
        return AVERROR_INVALIDDATA;
 
95
    }
87
96
    get_token(pb, token, sizeof(token)); //Unknown2
88
97
    get_token(pb, token, sizeof(token)); //Version ID
89
98
    get_token(pb, token, sizeof(token)); //Size