videoaggregator: Do not mix the same buffer twice when EOS.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 7 Apr 2017 16:49:52 +0000 (18:49 +0200)
committerMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 7 Apr 2017 16:55:54 +0000 (18:55 +0200)
When entering this code path, we know that:

We received EOS on this pad.
We consumed all its buffers.

In any case, we want to replace vaggpad->buffer with NULL,
otherwise we will end up mixing the same buffer twice.

https://bugzilla.gnome.org/show_bug.cgi?id=781037

gst-libs/gst/video/gstvideoaggregator.c

index 2abb4d5..e17c111 100644 (file)
@@ -1268,7 +1268,9 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
         } else if (is_eos) {
           eos = FALSE;
         }
-      } else if (is_eos) {
+      }
+
+      if (is_eos) {
         gst_buffer_replace (&pad->buffer, NULL);
       }
     }