mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
mpeg2decoder: fail early if no input caps have been provided
The mpeg2decoder class does not implement the ->parse() virtual function, and we always need to add the mpegvideoparse element before it. So we should set_needs_format of the decoder to TRUE, then if no parse before it, it can fail with a "not-negotiated" error early, rather than go on and generate unexpected error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
This commit is contained in:
parent
a0c392fc19
commit
5d4257a4c4
1 changed files with 1 additions and 0 deletions
|
@ -329,6 +329,7 @@ static void
|
||||||
gst_mpeg2_decoder_init (GstMpeg2Decoder * self)
|
gst_mpeg2_decoder_init (GstMpeg2Decoder * self)
|
||||||
{
|
{
|
||||||
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
|
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
|
||||||
|
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
|
||||||
|
|
||||||
self->priv = gst_mpeg2_decoder_get_instance_private (self);
|
self->priv = gst_mpeg2_decoder_get_instance_private (self);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue