]> git.sesse.net Git - ffmpeg/commitdiff
rmdec: pass mime type to ff_rm_read_mdpr_codecdata()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Aug 2012 04:14:29 +0000 (06:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Aug 2012 04:14:29 +0000 (06:14 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rdt.c
libavformat/rm.h
libavformat/rmdec.c

index 24d901cc9b42480259986fbf2a9c57492b38cad4..6404a5d5e38f9880c76f32f885b3b3eaaf2fbc19 100644 (file)
@@ -176,7 +176,7 @@ rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr)
         size = rdt->mlti_data_size;
         avio_seek(&pb, 0, SEEK_SET);
     }
-    if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, rdt->rmst[st->index], size) < 0)
+    if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, rdt->rmst[st->index], size, NULL) < 0)
         return -1;
 
     return 0;
index 6de10924abee8e874b38f9d35d2f1eace946ade7..b482c2fe40f5a8ba06c19a72a21f04f6df7f3ada 100644 (file)
@@ -51,7 +51,7 @@ extern AVInputFormat ff_rdt_demuxer;
  */
 int ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
                                AVStream *st, RMStream *rst,
-                               int codec_data_size);
+                               int codec_data_size, const uint8_t *mime);
 
 /**
  * Parse one rm-stream packet from the input bytestream.
index 03379a4f10fe512713ce38066266a7e5865b2ba5..0eadd66fb8910d3241d419c394a38d18b419e17f 100644 (file)
@@ -298,7 +298,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
 
 int
 ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
-                           AVStream *st, RMStream *rst, int codec_data_size)
+                           AVStream *st, RMStream *rst, int codec_data_size, const uint8_t *mime)
 {
     unsigned int v;
     int size;
@@ -440,7 +440,7 @@ static int rm_read_header(AVFormatContext *s)
     int tag_size;
     unsigned int start_time, duration;
     unsigned int data_off = 0, indx_off = 0;
-    char buf[128];
+    char buf[128], mime[128];
     int flags = 0;
 
     tag = avio_rl32(pb);
@@ -505,11 +505,11 @@ static int rm_read_header(AVFormatContext *s)
             if(duration>0)
                 s->duration = AV_NOPTS_VALUE;
             get_str8(pb, buf, sizeof(buf)); /* desc */
-            get_str8(pb, buf, sizeof(buf)); /* mimetype */
+            get_str8(pb, mime, sizeof(mime)); /* mimetype */
             st->codec->codec_type = AVMEDIA_TYPE_DATA;
             st->priv_data = ff_rm_alloc_rmstream();
             if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data,
-                                          avio_rb32(pb)) < 0)
+                                          avio_rb32(pb), mime) < 0)
                 return -1;
             break;
         case MKTAG('D', 'A', 'T', 'A'):