mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 21:12:12 +00:00
lavf/srtenc: allow zero duration events.
This is useful when you want to remux events with zero (or too small) durations.
This commit is contained in:
parent
eb36ee1ee1
commit
5f0105b820
@ -65,7 +65,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt)
|
||||
if (d <= 0)
|
||||
/* For backward compatibility, fallback to convergence_duration. */
|
||||
d = pkt->convergence_duration;
|
||||
if (s == AV_NOPTS_VALUE || d <= 0) {
|
||||
if (s == AV_NOPTS_VALUE || d < 0) {
|
||||
av_log(avf, AV_LOG_ERROR, "Insufficient timestamps.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user