]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/omadec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / omadec.c
index 2980f6fee50fe70416bbe6dac30aeae5a0cf2842..a62b560504f30a86ce742faaf1be83cf2a698f78 100644 (file)
@@ -234,7 +234,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
         rprobe(s, gdata, oc->r_val) < 0 &&
         nprobe(s, gdata, geob->datasize, oc->n_val) < 0) {
         int i;
-        for (i = 0; i < sizeof(leaf_table); i += 2) {
+        for (i = 0; i < FF_ARRAY_ELEMS(leaf_table); i += 2) {
             uint8_t buf[16];
             AV_WL64(buf, leaf_table[i]);
             AV_WL64(&buf[8], leaf_table[i+1]);
@@ -242,7 +242,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
             if (!rprobe(s, gdata, oc->r_val) || !nprobe(s, gdata, geob->datasize, oc->n_val))
                 break;
         }
-        if (i >= sizeof(leaf_table)) {
+        if (i >= FF_ARRAY_ELEMS(leaf_table)) {
             av_log(s, AV_LOG_ERROR, "Invalid key\n");
             return -1;
         }
@@ -259,8 +259,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
     return 0;
 }
 
-static int oma_read_header(AVFormatContext *s,
-                           AVFormatParameters *ap)
+static int oma_read_header(AVFormatContext *s)
 {
     int     ret, framesize, jsflag, samplerate;
     uint32_t codec_params;
@@ -271,7 +270,7 @@ static int oma_read_header(AVFormatContext *s,
     ID3v2ExtraMeta *extra_meta = NULL;
     OMAContext *oc = s->priv_data;
 
-    ff_id3v2_read_all(s, ID3v2_EA3_MAGIC, &extra_meta);
+    ff_id3v2_read(s, ID3v2_EA3_MAGIC, &extra_meta);
     ret = avio_read(s->pb, buf, EA3_HEADER_SIZE);
     if (ret < EA3_HEADER_SIZE)
         return -1;
@@ -416,7 +415,7 @@ static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t ti
 {
     OMAContext *oc = s->priv_data;
 
-    pcm_read_seek(s, stream_index, timestamp, flags);
+    ff_pcm_read_seek(s, stream_index, timestamp, flags);
 
     if (oc->encrypted) {
         /* readjust IV for CBC */
@@ -446,4 +445,3 @@ AVInputFormat ff_oma_demuxer = {
     .extensions     = "oma,omg,aa3",
     .codec_tag      = (const AVCodecTag* const []){ff_oma_codec_tags, 0},
 };
-