Opened 3 years ago

Closed 3 years ago

#8007 closed enhancement (fixed)

bsf_dump_extra repeat tables

Reported by: Anton Torp Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: bsf_dump_extra
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug: When using the "bsf_dump_extra" some tables are repeated.

How to reproduce:

% ffmpeg -i input.ts -c:v mpeg2_qsv -bsf:v dump_extra out.ts

With this example, the resulting "out.ts" file has an incorrect header in the first I frame. In this frame the PES tables "SEQUENCE HEADER" and "SEQUENCE EXTENSION" are repeated. And that's a clear bug!

The problem is based on this: The MPEG-2 QSV encoder doesn't repeat these tables. So they only appear in the bitstream in the first I frame. Then every new GOP lacks the tables, and as result the bitstream is not suitable for Broadcasting: If you start to play after the first GOP you can't reproduce the stream.

The solution is then to use the bitstream filter "dump_extra". This filter repeats the required tables at every GOP. But..., the current implementation doesn't check for the existence of a table, and always inserts it... even if they already exists.

So, please can you review the code and fix this bug? The idea is to check the existence of a table before inserting it.

Thank you!

Change History (2)

comment:1 by Carl Eugen Hoyos, 3 years ago

Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 by mkver, 3 years ago

Component: avfilteravcodec
Priority: normalwish
Resolution: fixed
Status: newclosed
Type: defectenhancement
Note: See TracTickets for help on using tickets.