videodecoder: remove useless code in negotiate_default_caps()
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Mon, 4 Feb 2019 10:48:25 +0000 (11:48 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Mon, 4 Feb 2019 10:53:03 +0000 (11:53 +0100)
commitf5a1164590ecb75afeb2d880f37da7332ea87b07
treeb71fa0de03b6c442c4ac2d0d27cb08244f21c72a
parent2b8e09b49fb544b756d70ecaabe4e464e23cd7c7
videodecoder: remove useless code in negotiate_default_caps()

gst_video_decoder_negotiate_default_caps() is meant to pick a default output
format when we need one earlier because of an incoming GAP.
It tries to use the input caps as a base if available and fallback to a default
format (I420 1280x720@30) for the missing fields.

But the framerate and pixel-aspect were not explicitly passed to
gst_video_decoder_set_output_state() which is solely relying on the input format
as reference to get the framerate anx pixel-aspect-ratio.
So there is no need to manually handling those two fields as
gst_video_decoder_set_output_state() will already use the ones from
upstream if available, and they will be ignored anyway if there are not.

This also prevent confusing debugging output where we claim to use a
specific framerate while actually none was set.
gst-libs/gst/video/gstvideodecoder.c