mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/movenc: Check that packet duration is valid in ff_mov_write_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1d36defe94
commit
744df0a031
|
@ -3333,6 +3333,10 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
|
pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
|
||||||
pkt->pts = AV_NOPTS_VALUE;
|
pkt->pts = AV_NOPTS_VALUE;
|
||||||
}
|
}
|
||||||
|
if (pkt->duration < 0) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "Application provided duration: %d is invalid\n", pkt->duration);
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mov->flags & FF_MOV_FLAG_FRAGMENT) {
|
if (mov->flags & FF_MOV_FLAG_FRAGMENT) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in New Issue