mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audioencoder/decoder: Mark pads as requiring reconfiguration again if negotiation fails
Otherwise we might end up in non-optimal configuration, especially when a flush happened during reconfiguration.
This commit is contained in:
parent
35ee4b056b
commit
420e229829
2 changed files with 4 additions and 0 deletions
|
@ -1036,6 +1036,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
|
|||
(GST_AUDIO_INFO_IS_VALID (&ctx->info)
|
||||
&& gst_pad_check_reconfigure (dec->srcpad)))) {
|
||||
if (!gst_audio_decoder_negotiate (dec)) {
|
||||
gst_pad_mark_reconfigure (dec->srcpad);
|
||||
if (GST_PAD_IS_FLUSHING (dec->srcpad))
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
else
|
||||
|
@ -3001,6 +3002,7 @@ gst_audio_decoder_allocate_output_buffer (GstAudioDecoder * dec, gsize size)
|
|||
&& gst_pad_check_reconfigure (dec->srcpad)))) {
|
||||
if (!gst_audio_decoder_negotiate (dec)) {
|
||||
GST_INFO_OBJECT (dec, "Failed to negotiate, fallback allocation");
|
||||
gst_pad_mark_reconfigure (dec->srcpad);
|
||||
goto fallback;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -627,6 +627,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf,
|
|||
if (G_UNLIKELY (ctx->output_caps_changed
|
||||
|| gst_pad_check_reconfigure (enc->srcpad))) {
|
||||
if (!gst_audio_encoder_negotiate (enc)) {
|
||||
gst_pad_mark_reconfigure (enc->srcpad);
|
||||
if (GST_PAD_IS_FLUSHING (enc->srcpad))
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
else
|
||||
|
@ -2714,6 +2715,7 @@ gst_audio_encoder_allocate_output_buffer (GstAudioEncoder * enc, gsize size)
|
|||
&& gst_pad_check_reconfigure (enc->srcpad)))) {
|
||||
if (!gst_audio_encoder_negotiate (enc)) {
|
||||
GST_INFO_OBJECT (enc, "Failed to negotiate, fallback allocation");
|
||||
gst_pad_mark_reconfigure (enc->srcpad);
|
||||
goto fallback;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue