demux_lavf: Avoid a crash if stream->url is not set

Print a warning since this is not supposed to happen.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31587 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-06-29 14:48:54 +00:00 committed by Uoti Urpala
parent e2dea75e4a
commit 815460d289
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ static int lavf_check_file(demuxer_t *demuxer){
}
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;