]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/4xm.c
flvdec: follow packets backward until a valid last timestamp is found
[ffmpeg] / libavformat / 4xm.c
index 19ebffda1a5a0439d8bbaad3269b7317a36c3667..61fa886e70dfd66991415bd0c23088c4e734e3bb 100644 (file)
@@ -200,6 +200,11 @@ static int fourxm_read_header(AVFormatContext *s)
                 ret = AVERROR_INVALIDDATA;
                 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 */
@@ -354,7 +359,7 @@ static int fourxm_read_close(AVFormatContext *s)
 
 AVInputFormat ff_fourxm_demuxer = {
     .name           = "4xm",
-    .long_name      = NULL_IF_CONFIG_SMALL("4X Technologies format"),
+    .long_name      = NULL_IF_CONFIG_SMALL("4X Technologies"),
     .priv_data_size = sizeof(FourxmDemuxContext),
     .read_probe     = fourxm_probe,
     .read_header    = fourxm_read_header,