mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 18:02:36 +00:00
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:
parent
e2dea75e4a
commit
815460d289
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user