diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-21 06:14:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-21 06:14:29 +0200 |
commit | 19a61bf39d3964eb332d141d1bf9a6847b6bb856 (patch) | |
tree | 9de4e71af372ed50342ff643aaf872bc21b29d38 | |
parent | 85a576775e1da9f22058aecd1924762e62a29867 (diff) | |
download | ffmpeg-streaming-19a61bf39d3964eb332d141d1bf9a6847b6bb856.zip ffmpeg-streaming-19a61bf39d3964eb332d141d1bf9a6847b6bb856.tar.gz |
rmdec: pass mime type to ff_rm_read_mdpr_codecdata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rdt.c | 2 | ||||
-rw-r--r-- | libavformat/rm.h | 2 | ||||
-rw-r--r-- | libavformat/rmdec.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index 24d901c..6404a5d 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -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; diff --git a/libavformat/rm.h b/libavformat/rm.h index 6de1092..b482c2f 100644 --- a/libavformat/rm.h +++ b/libavformat/rm.h @@ -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. diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 03379a4..0eadd66 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -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'): |