mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
stream_lavf: remove redundant message prefixes
This commit is contained in:
parent
a4d487f5b2
commit
80cbb3bac2
@ -144,14 +144,14 @@ static int open_f(stream_t *stream, int mode)
|
|||||||
else if (mode == STREAM_WRITE)
|
else if (mode == STREAM_WRITE)
|
||||||
flags = AVIO_FLAG_WRITE;
|
flags = AVIO_FLAG_WRITE;
|
||||||
else {
|
else {
|
||||||
MP_ERR(stream, "[ffmpeg] Unknown open mode %d\n", mode);
|
MP_ERR(stream, "Unknown open mode %d\n", mode);
|
||||||
res = STREAM_UNSUPPORTED;
|
res = STREAM_UNSUPPORTED;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *filename = stream->url;
|
const char *filename = stream->url;
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
MP_ERR(stream, "[ffmpeg] No URL\n");
|
MP_ERR(stream, "No URL\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < sizeof(prefix) / sizeof(prefix[0]); i++)
|
for (int i = 0; i < sizeof(prefix) / sizeof(prefix[0]); i++)
|
||||||
@ -169,7 +169,7 @@ static int open_f(stream_t *stream, int mode)
|
|||||||
talloc_free(temp);
|
talloc_free(temp);
|
||||||
return STREAM_OK;
|
return STREAM_OK;
|
||||||
}
|
}
|
||||||
MP_VERBOSE(stream, "[ffmpeg] Opening %s\n", filename);
|
MP_VERBOSE(stream, "Opening %s\n", filename);
|
||||||
|
|
||||||
// Replace "mms://" with "mmsh://", so that most mms:// URLs just work.
|
// Replace "mms://" with "mmsh://", so that most mms:// URLs just work.
|
||||||
bstr b_filename = bstr0(filename);
|
bstr b_filename = bstr0(filename);
|
||||||
@ -216,14 +216,14 @@ static int open_f(stream_t *stream, int mode)
|
|||||||
int err = avio_open2(&avio, filename, flags, &cb, &dict);
|
int err = avio_open2(&avio, filename, flags, &cb, &dict);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
if (err == AVERROR_PROTOCOL_NOT_FOUND)
|
if (err == AVERROR_PROTOCOL_NOT_FOUND)
|
||||||
MP_ERR(stream, "[ffmpeg] Protocol not found. Make sure"
|
MP_ERR(stream, "Protocol not found. Make sure"
|
||||||
" ffmpeg/Libav is compiled with networking support.\n");
|
" ffmpeg/Libav is compiled with networking support.\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVDictionaryEntry *t = NULL;
|
AVDictionaryEntry *t = NULL;
|
||||||
while ((t = av_dict_get(dict, "", t, AV_DICT_IGNORE_SUFFIX))) {
|
while ((t = av_dict_get(dict, "", t, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
MP_VERBOSE(stream, "[ffmpeg] Could not set stream option %s=%s\n",
|
MP_VERBOSE(stream, "Could not set stream option %s=%s\n",
|
||||||
t->key, t->value);
|
t->key, t->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user