[FFmpeg-cvslog] lavf/srtenc: allow zero duration events.
Clément Bœsch
git at videolan.org
Fri Oct 26 23:18:16 CEST 2012
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu Oct 25 00:26:13 2012 +0200| [5f0105b820fa7b5934bf677c96226d89f9e05b3a] | committer: Clément Bœsch
lavf/srtenc: allow zero duration events.
This is useful when you want to remux events with zero (or too small)
durations.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f0105b820fa7b5934bf677c96226d89f9e05b3a
---
libavformat/srtenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c
index f50cfbb..8338238 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);
}
More information about the ffmpeg-cvslog
mailing list