]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_asyncts.c
swscale: Provide the right alignment for external mmx asm
[ffmpeg] / libavfilter / af_asyncts.c
index f5d2798b308faa125864d70ebee037aedbaceb96..0b8be8d557ecf0f2a3a3dc93f7c2c9741d99153f 100644 (file)
@@ -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);
     }