Mercurial > mplayer.hg
diff libmpdemux/demux_lavf.c @ 31521:7ae298e3ba15
Avoid a crash if stream->url is not set, but print a warning since this
is not supposed to happen.
author | reimar |
---|---|
date | Tue, 29 Jun 2010 14:48:54 +0000 |
parents | 9a748502953b |
children | d918dc8c833c |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Tue Jun 29 12:13:57 2010 +0000 +++ b/libmpdemux/demux_lavf.c Tue Jun 29 14:48:54 2010 +0000 @@ -181,6 +181,10 @@ } probe_data_size += read_size; avpd.filename= demuxer->stream->url; + if (!avpd.filename) { + mp_msg(MSGT_DEMUX, MSGL_WARN, "Stream url is not set!\n"); + avpd.filename = ""; + } if (!strncmp(avpd.filename, "ffmpeg://", 9)) avpd.filename += 9; avpd.buf_size= probe_data_size;