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:
07a7145
)
lavf/srtdec: do not try to queue empty subtitle chunks.
author
Clément Bœsch
<ubitux@gmail.com>
Sun, 27 Jan 2013 11:25:21 +0000
(20:25 +0900)
committer
Clément Bœsch
<ubitux@gmail.com>
Sun, 27 Jan 2013 11:26:35 +0000
(20:26 +0900)
Regression since
3af3a30
.
Fixes Ticket2167.
libavformat/srtdec.c
patch
|
blob
|
history
diff --git
a/libavformat/srtdec.c
b/libavformat/srtdec.c
index
809d1d0
..
76e06e4
100644
(file)
--- a/
libavformat/srtdec.c
+++ b/
libavformat/srtdec.c
@@
-100,6
+100,8
@@
static int srt_read_header(AVFormatContext *s)
pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2);
if (pts != AV_NOPTS_VALUE) {
int len = buf.len - (ptr - buf.str);
+ if (len <= 0)
+ continue;
sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0);
if (!sub) {
res = AVERROR(ENOMEM);