[FFmpeg-cvslog] r25349 - trunk/libavformat/mmst.c
rbultje
subversion
Tue Oct 5 16:04:46 CEST 2010
Author: rbultje
Date: Tue Oct 5 16:04:46 2010
New Revision: 25349
Log:
Set proper error if server flags indicate that it doesn't support mmst. This
prevents a read-after-close-induced segfault later. Fixes issue 2266.
Patch by qrtt1 <chingyichan dot tw gmail com>.
Modified:
trunk/libavformat/mmst.c
Modified: trunk/libavformat/mmst.c
==============================================================================
--- trunk/libavformat/mmst.c Tue Oct 5 14:14:30 2010 (r25348)
+++ trunk/libavformat/mmst.c Tue Oct 5 16:04:46 2010 (r25349)
@@ -547,8 +547,12 @@ static int mms_open(URLContext *h, const
err = mms_safe_send_recv(mmst, NULL, SC_PKT_ASF_HEADER);
if (err)
goto fail;
- if((mmst->incoming_flags != 0X08) && (mmst->incoming_flags != 0X0C))
+ if((mmst->incoming_flags != 0X08) && (mmst->incoming_flags != 0X0C)) {
+ av_log(NULL, AV_LOG_ERROR,
+ "The server does not support MMST (try MMSH or RTSP)\n");
+ err = AVERROR_NOFMT;
goto fail;
+ }
err = ff_mms_asf_header_parser(mms);
if (err) {
dprintf(NULL, "asf header parsed failed!\n");
More information about the ffmpeg-cvslog
mailing list