Opened 5 weeks ago

#7620 new defect

avformat/tee: tee muxer with fifo incorrectly parse bsfs options

Reported by: caspy Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: tee fifo
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
if tee muxer used with fifo muxer (use_fifo=1) it incorrectly parse/handle bsfs options.

Simplified example to reproduce:

%ffmpeg -i in.mp4 -c copy -map 0 -f tee "[bsfs/v=h264_mp4toannexb]out.ts
runs ok

%ffmpeg -i in.mp4 -c copy -map 0 -f tee "[bsfs/v=h264_mp4toannexb:use_fifo=1]out.ts
fails with:
[mpegts @ 0x354ce40] Unknown option 'bsfs/v'
[tee @ 0x34f5e80] All tee outputs failed.
av_interleaved_write_frame(): Invalid argument

additional info:

in libavformat/tee.c:
in open_slave():

    if (tee_slave->use_fifo) {
...
            ret = av_dict_get_string(options, &format_options_str, '=', ':');
            ret = av_dict_set(&tee_slave->fifo_options, "format_opts", format_options_str,
...
        av_dict_free(&options);
        options = tee_slave->fifo_options;
    }

we refill 'options', and move bsfs parts into 'format_opts'
and later in this function this code:

while (entry = av_dict_get(options, "bsfs", NULL, AV_DICT_IGNORE_SUFFIX)) {

do not see bsfs options.

Change History (0)

Note: See TracTickets for help on using tickets.