mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/movenc: log stream index for invalid pkt duration
This commit is contained in:
parent
018ec4fe5f
commit
914f89dbc6
@ -6544,15 +6544,15 @@ static int check_pkt(AVFormatContext *s, MOVTrack *trk, AVPacket *pkt)
|
||||
|
||||
duration = pkt->dts - ref;
|
||||
if (pkt->dts < ref || duration >= INT_MAX) {
|
||||
av_log(s, AV_LOG_WARNING, "Packet duration: %"PRId64" / dts: %"PRId64" is out of range\n",
|
||||
duration, pkt->dts);
|
||||
av_log(s, AV_LOG_WARNING, "Packet duration: %"PRId64" / dts: %"PRId64" in stream %d is out of range\n",
|
||||
duration, pkt->dts, pkt->stream_index);
|
||||
|
||||
pkt->dts = ref + 1;
|
||||
pkt->pts = AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
if (pkt->duration < 0 || pkt->duration > INT_MAX) {
|
||||
av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is invalid\n", pkt->duration);
|
||||
av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" in stream %d is invalid\n", pkt->duration, pkt->stream_index);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user