diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-10-25 00:26:13 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-10-26 21:48:27 +0200 |
commit | 5f0105b820fa7b5934bf677c96226d89f9e05b3a (patch) | |
tree | 57427aac734078e40e69ea4819cefcfbcca7868d /libavformat/srtenc.c | |
parent | eb36ee1ee11c269e24ad4595fadf50e78463d5e2 (diff) | |
download | ffmpeg-5f0105b820fa7b5934bf677c96226d89f9e05b3a.tar.gz |
lavf/srtenc: allow zero duration events.
This is useful when you want to remux events with zero (or too small)
durations.
Diffstat (limited to 'libavformat/srtenc.c')
-rw-r--r-- | libavformat/srtenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index f50cfbb127..833823839b 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -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); } |