Opened 5 years ago

Closed 5 years ago

#8039 closed defect (fixed)

mpegtsenc: incorrect PCR with multiple programs

Reported by: Andreas Håkon Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

The MPEG-TS muxer has a serious bug related to the PCR pid selection.
This bug appears when more than one program is used. The root cause is because
the current code targets only one program when selecting the stream for the PCR.

How to reproduce:

[ test file "Day_Flight.mpg" from
https://samples.ffmpeg.org/MPEG2/mpegts-klv/Day%20Flight.mpg ]

% ffmpeg -loglevel verbose -y -f mpegts -i Day_Flight.mpg \
 -map i:0x1e1 -c:v:0 copy -map i:0x1e1 -c:v:1 copy \
 -program st=0 -program st=1 -f mpegts out-error.ts

If you analyze the output, you can see that the file "out-error.ts" has PCR
marks in every packet of the pid 256 (a total of 561862 packets with PCR marks).
However, the pid 257 has 783 packets only with PCR marks.

Current source code of the mpegts muxer only initializes the PCR of one program. Other programs are unintialized. And this is a bug.

Regards.
A.H.

Change History (3)

comment:1 by Andreas Håkon, 5 years ago

Sorry for that...

.
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
.

OK, but with all due respect, I post here because it's a real bug and there are no comments on the mailing list:
https://patchwork.ffmpeg.org/patch/14036/

Regards.
A.H.

comment:2 by Carl Eugen Hoyos, 5 years ago

Keywords: mpegts added; mpegtsenc removed
Priority: importantnormal

Feel free to ping your patch on the mailing list or on irc.

comment:3 by Marton Balint, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.