mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
vp9dec: Get input width/height from the codec instead of the input caps
They are reported properly by libvpx if the correct struct members are used. This also fixes handling of resolution changes without input caps changes. https://bugzilla.gnome.org/show_bug.cgi?id=719359
This commit is contained in:
parent
5430b6c351
commit
9eb22a533b
1 changed files with 4 additions and 7 deletions
|
@ -554,20 +554,17 @@ gst_vp9_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Width/height in the img is wrong */
|
if (!dec->output_state || dec->output_state->info.finfo->format != fmt ||
|
||||||
if (!dec->output_state || dec->output_state->info.finfo->format != fmt /*||
|
dec->output_state->info.width != img->d_w ||
|
||||||
dec->output_state->info.width != img->w ||
|
dec->output_state->info.height != img->d_h) {
|
||||||
dec->output_state->info.height != img->h */ ) {
|
|
||||||
gboolean send_tags = !dec->output_state;
|
gboolean send_tags = !dec->output_state;
|
||||||
|
|
||||||
if (dec->output_state)
|
if (dec->output_state)
|
||||||
gst_video_codec_state_unref (dec->output_state);
|
gst_video_codec_state_unref (dec->output_state);
|
||||||
|
|
||||||
/* FIXME: The width/height in the img is wrong */
|
|
||||||
dec->output_state =
|
dec->output_state =
|
||||||
gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec),
|
gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec),
|
||||||
fmt, dec->input_state->info.width, dec->input_state->info.height,
|
fmt, img->d_w, img->d_h, dec->input_state);
|
||||||
dec->input_state);
|
|
||||||
gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
|
gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
|
||||||
|
|
||||||
if (send_tags)
|
if (send_tags)
|
||||||
|
|
Loading…
Reference in a new issue