avformat/mpegtsenc: re-emit extradata ahead of IDR pictures even if AUD is already present

Current mpegtsenc code only inserts SPS/PPS from extradata before IDR frames if
AUD is also inserted.

Unfortunately some encoders may preface a key frame with an AUD, but no
SPS/PPS. In that case current code does not repeat the "extradata" and the
resulting HLS stream may become noncompliant and unjoinable.

Fix this by always inserting SPS/PPS and moving AUD to the beginning of the
packet if it is already present.

Fixes ticket #10148.

Signed-off-by: Marton Balint <cus@passwd.hu>
pull/389/head
John Coiner 2 years ago committed by Marton Balint
parent 3807fbd90a
commit e0cb89c354
Loading…
Cancel
Save