From c4258069bb2e76b6238fb759d3887cb518e9044c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 23 Aug 2012 17:31:14 +0200 Subject: [PATCH] Get the input buffers from the codec --- sys/androidmedia/gstamcvideodec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index b5d0b33ef8..616026d875 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -1004,6 +1004,15 @@ gst_amc_video_dec_set_format (GstVideoDecoder * decoder, return FALSE; } + if (self->input_buffers) + gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers); + self->input_buffers = + gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers); + if (!self->input_buffers) { + GST_ERROR_OBJECT (self, "Failed to get input buffers"); + return FALSE; + } + self->started = TRUE; self->input_state_changed = TRUE;