]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mtv.c
configure: inlcude sys/types.h when checking sys/socket.h
[ffmpeg] / libavformat / mtv.c
index 0547430f7419324a44a1809efa6ad5b4d48922e6..8d08b792f19c2badbcf07d02216de178625b73fd 100644 (file)
@@ -40,7 +40,7 @@ typedef struct MTVDemuxContext {
     unsigned int file_size;         ///< filesize, not always right
     unsigned int segments;          ///< number of 512 byte segments
     unsigned int audio_identifier;  ///< 'MP3' on all files I have seen
-    unsigned int audio_br;          ///< bitrate of audio chanel (mp3)
+    unsigned int audio_br;          ///< bitrate of audio channel (mp3)
     unsigned int img_colorfmt;      ///< frame colorfmt rgb 565/555
     unsigned int img_bpp;           ///< frame bits per pixel
     unsigned int img_width;         //
@@ -62,7 +62,7 @@ static int mtv_probe(AVProbeData *p)
         return 0;
 
     /* If width or height are 0 then imagesize header field should not */
-    if(AV_RL16(&p->buf[52]) && AV_RL16(&p->buf[54]))
+    if(!AV_RL16(&p->buf[52]) || !AV_RL16(&p->buf[54]))
     {
         if(!!AV_RL16(&p->buf[56]))
             return AVPROBE_SCORE_MAX/2;
@@ -70,6 +70,9 @@ static int mtv_probe(AVProbeData *p)
             return 0;
     }
 
+    if(p->buf[51] != 16)
+        return AVPROBE_SCORE_MAX/4; // But we are going to assume 16bpp anyway ..
+
     return AVPROBE_SCORE_MAX;
 }