OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
290d102
)
af_asyncts: check return value from lavr when flushing.
author
Anton Khirnov
<anton@khirnov.net>
Tue, 4 Sep 2012 20:01:38 +0000
(22:01 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 7 Sep 2012 07:06:48 +0000
(09:06 +0200)
Fixes an infinite loop on flush when avresample_get_delay() still
reports some samples but avresample_convert() doesn't return any data.
libavfilter/af_asyncts.c
patch
|
blob
|
history
diff --git
a/libavfilter/af_asyncts.c
b/libavfilter/af_asyncts.c
index
f5d2798
..
0b8be8d
100644
(file)
--- a/
libavfilter/af_asyncts.c
+++ b/
libavfilter/af_asyncts.c
@@
-133,8
+133,13
@@
static int request_frame(AVFilterLink *link)
nb_samples);
if (!buf)
return AVERROR(ENOMEM);
- avresample_convert(s->avr, (void**)buf->extended_data, buf->linesize[0],
- nb_samples, NULL, 0, 0);
+ ret = avresample_convert(s->avr, (void**)buf->extended_data,
+ buf->linesize[0], nb_samples, NULL, 0, 0);
+ if (ret <= 0) {
+ avfilter_unref_bufferp(&buf);
+ return (ret < 0) ? ret : AVERROR_EOF;
+ }
+
buf->pts = s->pts;
return ff_filter_samples(link, buf);
}