diff --git a/libavformat/4xm.c b/libavformat/4xm.c index b4dd3d4416..755a21168c 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -195,6 +195,11 @@ static int fourxm_read_header(AVFormatContext *s, ret= -1; goto fail; } + if(!fourxm->tracks[current_track].adpcm && fourxm->tracks[current_track].bits<8){ + av_log(s, AV_LOG_ERROR, "bits unspecified for non ADPCM\n"); + ret = AVERROR_INVALIDDATA; + goto fail; + } i += 8 + size; /* allocate a new AVStream */