]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/4xm.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / 4xm.c
index 3d9c5aea12908347dd23f7bc3298810f7aaff04d..ef87b3b23a7b8776301fdf44c26086bd9180f510 100644 (file)
@@ -91,8 +91,7 @@ static int fourxm_probe(AVProbeData *p)
     return AVPROBE_SCORE_MAX;
 }
 
-static int fourxm_read_header(AVFormatContext *s,
-                              AVFormatParameters *ap)
+static int fourxm_read_header(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
     unsigned int fourcc_tag;
@@ -170,7 +169,7 @@ static int fourxm_read_header(AVFormatContext *s,
             current_track = AV_RL32(&header[i + 8]);
             if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
                 av_log(s, AV_LOG_ERROR, "current_track too large\n");
-                ret= -1;
+                ret = AVERROR_INVALIDDATA;
                 goto fail;
             }
             if (current_track + 1 > fourxm->track_count) {
@@ -194,7 +193,7 @@ static int fourxm_read_header(AVFormatContext *s,
                || fourxm->tracks[current_track].sample_rate <= 0
                || fourxm->tracks[current_track].bits        <  0){
                 av_log(s, AV_LOG_ERROR, "audio header invalid\n");
-                ret= -1;
+                ret = AVERROR_INVALIDDATA;
                 goto fail;
             }
             i += 8 + size;