From 220ccdf2755e545ba6486827dcb59d3e26ba7868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 30 Oct 2011 14:51:48 +0000 Subject: [PATCH] audioencoder: save audio info parsed in setcaps in encoder context Otherwise we'll just error out when the first buffer gets pushed. This is a porting artefact, in 0.10 the infos were allocated on the heap, now we're doing everything with stack-allocated structs. --- gst-libs/gst/audio/gstaudioencoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 4952236280..c5f1a86bd1 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -1081,6 +1081,9 @@ gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc, GstCaps * caps) if (klass->set_format) res = klass->set_format (enc, &state); + if (res) + ctx->info = state; + /* notify if new latency */ GST_OBJECT_LOCK (enc); if ((ctx->min_latency > 0 && ctx->min_latency != old_min_latency) ||