You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
movenc: take packet dts shifting into mention in check_pkt
This FFmpeg-specific "fuzzer fix" was never perfect, but now it stopped encoding of actual content with a big enough DTS shift. This returns the function to its original state of results before negative CTS offsets were added. I remember dealing with this function before, but somehow had forgotten about it during VDD. The test cases not tripping this over also didn't help.
This commit is contained in:
committed by
Clément Bœsch
parent
8be3fc88d3
commit
ffc58b2ce2
@@ -4989,6 +4989,12 @@ static int check_pkt(AVFormatContext *s, AVPacket *pkt)
|
|||||||
} else
|
} else
|
||||||
ref = pkt->dts; // Skip tests for the first packet
|
ref = pkt->dts; // Skip tests for the first packet
|
||||||
|
|
||||||
|
if (trk->dts_shift != AV_NOPTS_VALUE) {
|
||||||
|
/* With negative CTS offsets we have set an offset to the DTS,
|
||||||
|
* reverse this for the check. */
|
||||||
|
ref -= trk->dts_shift;
|
||||||
|
}
|
||||||
|
|
||||||
duration = pkt->dts - ref;
|
duration = pkt->dts - ref;
|
||||||
if (pkt->dts < ref || duration >= INT_MAX) {
|
if (pkt->dts < ref || duration >= INT_MAX) {
|
||||||
av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" / timestamp: %"PRId64" is out of range for mov/mp4 format\n",
|
av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" / timestamp: %"PRId64" is out of range for mov/mp4 format\n",
|
||||||
|
Reference in New Issue
Block a user