replace cur_dts mangling with use of our next_dts array
parent
1f5d7866f7
commit
1e6f34235c
|
@ -1227,6 +1227,26 @@ int VideoStore::write_packet(AVPacket *pkt, AVStream *stream) {
|
|||
pkt->dts = stream->cur_dts;*/
|
||||
}
|
||||
|
||||
if (pkt->dts > pkt->pts) {
|
||||
Warning("pkt.dts(%" PRId64 ") must be <= pkt.pts(%" PRId64 ")."
|
||||
"Decompression must happen before presentation.",
|
||||
pkt->dts, pkt->pts);
|
||||
/* Debug(1,
|
||||
"pkt.dts(%" PRId64 ") must be <= pkt.pts(%" PRId64 ")."
|
||||
"Decompression must happen before presentation.",
|
||||
pkt->dts, pkt->pts);*/
|
||||
pkt->pts = pkt->dts;
|
||||
}
|
||||
#else
|
||||
if (pkt->dts == AV_NOPTS_VALUE) {
|
||||
Error("undefined dts");
|
||||
// Debug(1, "undef dts, fixing by setting to stream cur_dts %" PRId64, stream->cur_dts);
|
||||
// pkt->dts = stream->cur_dts;
|
||||
} else if (pkt->dts < next_dts[stream->index]) {
|
||||
Debug(1, "non increasing dts, fixing. our dts %" PRId64 " stream next_dts %" PRId64, pkt->dts, next_dts[stream->index]);
|
||||
pkt->dts = next_dts[stream->index];
|
||||
}
|
||||
|
||||
if (pkt->dts > pkt->pts) {
|
||||
Warning("pkt.dts(%" PRId64 ") must be <= pkt.pts(%" PRId64 ")."
|
||||
"Decompression must happen before presentation.",
|
||||
|
|
Loading…
Reference in New Issue