提交 30266038 编写于 作者: M Martin Storsjö

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: NMartin Storsjö <martin@martin.st>
上级 d0fd6fc2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册