mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 14:00:43 +00:00
warn if dts < pcr which means TS is invalid
Originally committed as revision 16607 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
31a2506349
commit
811a0aa785
@ -539,6 +539,8 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
|
||||
if (write_pcr) {
|
||||
// add 11, pcr references the last byte of program clock reference base
|
||||
pcr = ts->cur_pcr + (4+7)*8*90000LL / ts->mux_rate;
|
||||
if (dts != AV_NOPTS_VALUE && dts < pcr)
|
||||
av_log(s, AV_LOG_WARNING, "dts < pcr, TS is invalid\n");
|
||||
*q++ = 7; /* AFC length */
|
||||
*q++ = 0x10; /* flags: PCR present */
|
||||
*q++ = pcr >> 25;
|
||||
|
Loading…
Reference in New Issue
Block a user