git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb36ee1
)
lavf/srtenc: allow zero duration events.
author
Clément Bœsch
<ubitux@gmail.com>
Wed, 24 Oct 2012 22:26:13 +0000
(
00:26
+0200)
committer
Clément Bœsch
<ubitux@gmail.com>
Fri, 26 Oct 2012 19:48:27 +0000
(21:48 +0200)
This is useful when you want to remux events with zero (or too small)
durations.
libavformat/srtenc.c
patch
|
blob
|
history
diff --git
a/libavformat/srtenc.c
b/libavformat/srtenc.c
index
f50cfbb
..
8338238
100644
(file)
--- 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);
}