]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oma.c
pvez avi fourcc is truemotion1
[ffmpeg] / libavformat / oma.c
index 1f8f51238f57289bebee62dd1f93c9c16ed6ffa7..161d1a0867fd02eab7a16e75e998a519652c46bd 100644 (file)
@@ -89,7 +89,7 @@ static int oma_read_header(AVFormatContext *s,
     if (ret != EA3_HEADER_SIZE)
         return -1;
 
-    if (memcmp(buf, (uint8_t[]){'E', 'A', '3'},3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
+    if (memcmp(buf, (const uint8_t[]){'E', 'A', '3'},3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
         av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n");
         return -1;
     }
@@ -147,6 +147,10 @@ static int oma_read_header(AVFormatContext *s,
             av_set_pts_info(st, 64, 1, st->codec->sample_rate);
             av_log(s, AV_LOG_ERROR, "Unsupported codec ATRAC3+!\n");
             break;
+        case OMA_CODECID_MP3:
+            st->need_parsing = AVSTREAM_PARSE_FULL;
+            framesize = 1024;
+            break;
         default:
             av_log(s, AV_LOG_ERROR, "Unsupported codec %d!\n",buf[32]);
             return -1;
@@ -173,7 +177,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
 
 static int oma_read_probe(AVProbeData *p)
 {
-    if (!memcmp(p->buf, (uint8_t[]){'e', 'a', '3', 3, 0},5))
+    if (!memcmp(p->buf, (const uint8_t[]){'e', 'a', '3', 3, 0},5))
         return AVPROBE_SCORE_MAX;
     else
         return 0;
@@ -191,6 +195,6 @@ AVInputFormat oma_demuxer = {
     pcm_read_seek,
     .flags= AVFMT_GENERIC_INDEX,
     .extensions = "oma,aa3",
-    .codec_tag= (const AVCodecTag*[]){codec_oma_tags, 0},
+    .codec_tag= (const AVCodecTag* const []){codec_oma_tags, 0},
 };