mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 21:35:44 +00:00
Use size information from the demuxer, whenever available. i.e. fix WMV3 decoding.
This commit is contained in:
parent
477e3b8530
commit
4285c2cc02
2 changed files with 26 additions and 0 deletions
|
@ -366,6 +366,10 @@ gst_vaapi_decoder_ffmpeg_open(GstVaapiDecoderFfmpeg *ffdecoder, GstBuffer *buffe
|
|||
}
|
||||
}
|
||||
|
||||
/* Use size information from the demuxer, whenever available */
|
||||
priv->avctx->coded_width = GST_VAAPI_DECODER_WIDTH(ffdecoder);
|
||||
priv->avctx->coded_height = GST_VAAPI_DECODER_HEIGHT(ffdecoder);
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK(display);
|
||||
ret = avcodec_open(priv->avctx, ffcodec);
|
||||
GST_VAAPI_DISPLAY_UNLOCK(display);
|
||||
|
|
|
@ -76,6 +76,28 @@ G_BEGIN_DECLS
|
|||
#define GST_VAAPI_DECODER_CODEC_DATA(decoder) \
|
||||
GST_VAAPI_DECODER_CAST(decoder)->priv->codec_data
|
||||
|
||||
/**
|
||||
* GST_VAAPI_DECODER_WIDTH:
|
||||
* @decoder: a #GstVaapiDecoder
|
||||
*
|
||||
* Macro that evaluates to the coded width of the picture
|
||||
* This is an internal macro that does not do any run-time type check.
|
||||
*/
|
||||
#undef GST_VAAPI_DECODER_WIDTH
|
||||
#define GST_VAAPI_DECODER_WIDTH(decoder) \
|
||||
GST_VAAPI_DECODER_CAST(decoder)->priv->width
|
||||
|
||||
/**
|
||||
* GST_VAAPI_DECODER_HEIGHT:
|
||||
* @decoder: a #GstVaapiDecoder
|
||||
*
|
||||
* Macro that evaluates to the coded height of the picture
|
||||
* This is an internal macro that does not do any run-time type check.
|
||||
*/
|
||||
#undef GST_VAAPI_DECODER_HEIGHT
|
||||
#define GST_VAAPI_DECODER_HEIGHT(decoder) \
|
||||
GST_VAAPI_DECODER_CAST(decoder)->priv->height
|
||||
|
||||
/* End-of-Stream buffer */
|
||||
#define GST_BUFFER_FLAG_EOS (GST_BUFFER_FLAG_LAST + 0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue