mirror of https://github.com/mpv-player/mpv
demux_lavf: work around idiotic libavutil API printing a warning
Trying to set a non-existent flag (like +keepside on Libav) causes libavutil print an incomprehensible warning (something about eval; probably the overengineered libavutil option parser tripping over the '+' normally used for flags, and trying to interpret it as formula). There's apparently no easy way to check for the existence of a flag, so add some more ifdeffery to shut it up.
This commit is contained in:
parent
17ec073a15
commit
8eaf6c42ac
|
@ -560,9 +560,13 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
|
|||
avfc->flags |= AVFMT_FLAG_GENPTS;
|
||||
if (opts->index_mode == 0)
|
||||
avfc->flags |= AVFMT_FLAG_IGNIDX;
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MICRO >= 100
|
||||
/* Keep side data as side data instead of mashing it into the packet
|
||||
* stream. */
|
||||
* stream.
|
||||
* Note: Libav doesn't have this horrible insanity. */
|
||||
av_opt_set(avfc, "fflags", "+keepside", 0);
|
||||
#endif
|
||||
|
||||
if (lavfdopts->probesize) {
|
||||
if (av_opt_set_int(avfc, "probesize", lavfdopts->probesize, 0) < 0)
|
||||
|
|
Loading…
Reference in New Issue