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>
This commit is contained in:
Martin Storsjö 2011-12-02 11:06:18 +02:00
parent d0fd6fc201
commit 30266038bd

View File

@ -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;