mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
codecs: mpeg2: Drain before a new_sequence get signalled
The decoder may need to re-allocate the output buffer, it is easier if all pictured have been outputed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013>
This commit is contained in:
parent
f9958eda8e
commit
aedd5f0dd1
1 changed files with 4 additions and 0 deletions
|
@ -740,6 +740,10 @@ gst_mpeg2_decoder_handle_picture (GstMpeg2Decoder * decoder,
|
|||
if (priv->seq_changed) {
|
||||
GstFlowReturn ret;
|
||||
|
||||
ret = gst_mpeg2_decoder_drain (GST_VIDEO_DECODER (decoder));
|
||||
if (ret != GST_FLOW_OK)
|
||||
return ret;
|
||||
|
||||
if (klass->get_preferred_output_delay)
|
||||
priv->preferred_output_delay =
|
||||
klass->get_preferred_output_delay (decoder, priv->is_live);
|
||||
|
|
Loading…
Reference in a new issue