Commit 13ee94a4 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rdt: Forward whitelists to rdt demuxer

Reviewed-by: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5f558198
...@@ -523,18 +523,27 @@ static PayloadContext * ...@@ -523,18 +523,27 @@ static PayloadContext *
rdt_new_context (void) rdt_new_context (void)
{ {
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext)); PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
int ret;
if (!rdt) if (!rdt)
return NULL; return NULL;
ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
if (ret < 0) { rdt->rmctx = avformat_alloc_context();
av_free(rdt); if (!rdt->rmctx)
return NULL; av_freep(&rdt);
}
return rdt; return rdt;
} }
static int
rdt_init_context (AVFormatContext *s, int st_index, PayloadContext *rdt)
{
int ret;
if ((ret = ff_copy_whitelists(rdt->rmctx, s)) < 0)
return ret;
return avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
}
static void static void
rdt_free_context (PayloadContext *rdt) rdt_free_context (PayloadContext *rdt)
{ {
...@@ -559,6 +568,7 @@ static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \ ...@@ -559,6 +568,7 @@ static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \
.codec_id = AV_CODEC_ID_NONE, \ .codec_id = AV_CODEC_ID_NONE, \
.parse_sdp_a_line = rdt_parse_sdp_line, \ .parse_sdp_a_line = rdt_parse_sdp_line, \
.alloc = rdt_new_context, \ .alloc = rdt_new_context, \
.init = rdt_init_context, \
.free = rdt_free_context, \ .free = rdt_free_context, \
.parse_packet = rdt_parse_packet \ .parse_packet = rdt_parse_packet \
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment