[FFmpeg-cvslog] rtsp: Initialize the media_type_mask in the rtp guessing demuxer

Martin Storsjö git at videolan.org
Sat Dec 3 03:13:08 CET 2011


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Dec  2 11:06:18 2011 +0200| [30266038bdfdecd244edbd91f19e19cb159a74ab] | committer: 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: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30266038bdfdecd244edbd91f19e19cb159a74ab
---

 libavformat/rtsp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 7548a41..b63f9f6 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;



More information about the ffmpeg-cvslog mailing list