]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/buffersink.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavfilter / buffersink.c
index 50d949b2ac0a9a1d097ee42e5252ad58f80c2839..9e908adf6b7555bd3666269f6a6e177e2c96d53c 100644 (file)
@@ -1,20 +1,20 @@
 /*
  * Copyright (c) 2011 Stefano Sabatini
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -51,11 +51,17 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *buf)
 {
     BufferSinkContext *s = link->dst->priv;
 
-    av_assert0(!s->cur_buf);
+//     av_assert0(!s->cur_buf);
     s->cur_buf    = buf;
     link->cur_buf = NULL;
 };
 
+static int filter_samples(AVFilterLink *link, AVFilterBufferRef *buf)
+{
+    start_frame(link, buf);
+    return 0;
+}
+
 int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
 {
     BufferSinkContext *s    = ctx->priv;
@@ -138,7 +144,7 @@ int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **pbuf,
 }
 
 AVFilter avfilter_vsink_buffer = {
-    .name      = "buffersink",
+    .name      = "buffersink_old",
     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."),
     .priv_size = sizeof(BufferSinkContext),
     .uninit    = uninit,
@@ -153,14 +159,14 @@ AVFilter avfilter_vsink_buffer = {
 };
 
 AVFilter avfilter_asink_abuffer = {
-    .name      = "abuffersink",
+    .name      = "abuffersink_old",
     .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."),
     .priv_size = sizeof(BufferSinkContext),
     .uninit    = uninit,
 
     .inputs    = (AVFilterPad[]) {{ .name           = "default",
                                     .type           = AVMEDIA_TYPE_AUDIO,
-                                    .filter_samples = start_frame,
+                                    .filter_samples = filter_samples,
                                     .min_perms      = AV_PERM_READ,
                                     .needs_fifo     = 1 },
                                   { .name = NULL }},