summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-02 09:09:49 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-09-02 09:09:49 +0300
commit9eb22a533b429dc57aca9ba2d7a1b01d4361d98c (patch)
treeccbadb57f5d5fd19f8e218887fe1b48e6d70a770
parent5430b6c351e015265a79eb92fc9203ec8bc06de2 (diff)
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
-rw-r--r--ext/vpx/gstvp9dec.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/vpx/gstvp9dec.c b/ext/vpx/gstvp9dec.c
index 6f0b585ea..ff075bb37 100644
--- a/ext/vpx/gstvp9dec.c
+++ b/ext/vpx/gstvp9dec.c
@@ -554,20 +554,17 @@ gst_vp9_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
break;
}
- /* FIXME: Width/height in the img is wrong */
- if (!dec->output_state || dec->output_state->info.finfo->format != fmt /*||
- dec->output_state->info.width != img->w ||
- dec->output_state->info.height != img->h */ ) {
+ if (!dec->output_state || dec->output_state->info.finfo->format != fmt ||
+ dec->output_state->info.width != img->d_w ||
+ dec->output_state->info.height != img->d_h) {
gboolean send_tags = !dec->output_state;
if (dec->output_state)
gst_video_codec_state_unref (dec->output_state);
- /* FIXME: The width/height in the img is wrong */
dec->output_state =
gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec),
- fmt, dec->input_state->info.width, dec->input_state->info.height,
- dec->input_state);
+ fmt, img->d_w, img->d_h, dec->input_state);
gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
if (send_tags)