mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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:
parent
5ee51e47a1
commit
220ccdf275
1 changed files with 3 additions and 0 deletions
|
@ -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) ||
|
||||
|
|
Loading…
Reference in a new issue