diff options
author | Martin Storsjö <martin@martin.st> | 2011-12-02 11:06:18 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-12-02 11:52:47 +0200 |
commit | 30266038bdfdecd244edbd91f19e19cb159a74ab (patch) | |
tree | 5f03d6b439e7e2fd6f6db628f7fb82265c3b130d /libavformat/rtsp.c | |
parent | d0fd6fc20130ef514df294727bf21d01ccbf588c (diff) | |
download | ffmpeg-30266038bdfdecd244edbd91f19e19cb159a74ab.tar.gz |
rtsp: Initialize the media_type_mask in the rtp guessing demuxer
The media_type_mask is initialized via AVOptions for the
rtsp and sdp demuxers, but it isn't available as an option
for the rtp guessing demuxer (since it doesn't really make
sense there). Therefore, it must be manually initialized
instead, since a zero value means no media types at all
are accepted.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 7548a418b2..b63f9f68cf 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1934,6 +1934,7 @@ static int rtp_read_header(AVFormatContext *s, struct sockaddr_storage addr; AVIOContext pb; socklen_t addrlen = sizeof(addr); + RTSPState *rt = s->priv_data; if (!ff_network_init()) return AVERROR(EIO); @@ -1997,6 +1998,8 @@ static int rtp_read_header(AVFormatContext *s, /* sdp_read_header initializes this again */ ff_network_close(); + rt->media_type_mask = (1 << (AVMEDIA_TYPE_DATA+1)) - 1; + ret = sdp_read_header(s, ap); s->pb = NULL; return ret; |