[FFmpeg-trac] #8007(avfilter:new): bsf_dump_extra repeat tables

FFmpeg trac at avcodec.org
Mon Jul 8 22:26:46 EEST 2019


#8007: bsf_dump_extra repeat tables
-------------------------------------+-------------------------------------
             Reporter:  atorp        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
             Keywords:               |  master
  bsf_dump_extra                     |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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!

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8007>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list