repositories
/
deb_ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git]
/
ffmpeg
/
libavformat
/
rdt.c
diff --git
a/ffmpeg/libavformat/rdt.c
b/ffmpeg/libavformat/rdt.c
index e8dc8f5892f6316a53309f94f2c45a09ca1f9e76..158a8212e1444e945fb95d18d80416e4c4cf5014 100644
(file)
--- a/
ffmpeg/libavformat/rdt.c
+++ b/
ffmpeg/libavformat/rdt.c
@@
-523,18
+523,27
@@
static PayloadContext *
rdt_new_context (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
rdt_new_context (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
- int ret;
if (!rdt)
return NULL;
if (!rdt)
return NULL;
- ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
- if (ret < 0) {
- av_free(rdt);
- return NULL;
- }
+
+ rdt->rmctx = avformat_alloc_context();
+ if (!rdt->rmctx)
+ 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
rdt_free_context (PayloadContext *rdt)
{
static void
rdt_free_context (PayloadContext *rdt)
{
@@
-559,6
+568,7
@@
static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \
.codec_id = AV_CODEC_ID_NONE, \
.parse_sdp_a_line = rdt_parse_sdp_line, \
.alloc = rdt_new_context, \
.codec_id = AV_CODEC_ID_NONE, \
.parse_sdp_a_line = rdt_parse_sdp_line, \
.alloc = rdt_new_context, \
+ .init = rdt_init_context, \
.free = rdt_free_context, \
.parse_packet = rdt_parse_packet \
}
.free = rdt_free_context, \
.parse_packet = rdt_parse_packet \
}