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.
This commit is contained in:
Tim-Philipp Müller 2011-10-30 14:51:48 +00:00
parent 5ee51e47a1
commit 220ccdf275

View file

@ -1081,6 +1081,9 @@ gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc, GstCaps * caps)
if (klass->set_format) if (klass->set_format)
res = klass->set_format (enc, &state); res = klass->set_format (enc, &state);
if (res)
ctx->info = state;
/* notify if new latency */ /* notify if new latency */
GST_OBJECT_LOCK (enc); GST_OBJECT_LOCK (enc);
if ((ctx->min_latency > 0 && ctx->min_latency != old_min_latency) || if ((ctx->min_latency > 0 && ctx->min_latency != old_min_latency) ||