avviddec: Disable direct rendering before a frame has been produces

ffmpeg doesn't provide the final's image width & height in the get_buffer2()
callback, so it's not possible to create an output state for GstVideoDecoder
at this stage. So only try to do direct rendering if the buffer pool has already
been negotiated based on the final decoded size.

This partially reverts the effects of 2e621f8db

https://bugzilla.gnome.org/show_bug.cgi?id=752802
This commit is contained in:
Olivier Crête 2015-07-28 16:16:10 -04:00
parent 70443730a5
commit 0a0ee42752

View file

@ -664,7 +664,12 @@ gst_ffmpegviddec_get_buffer2 (AVCodecContext * context, AVFrame * picture,
goto fallback;
/* see if we need renegotiation */
if (G_UNLIKELY (!gst_ffmpegviddec_negotiate (ffmpegdec, context, picture,
/* Disabled for now as ffmpeg doesn't give us the output dimensions
* in the getbuffer2 callback. The real dimensions are only available
* when a buffer is produced.
*/
if (FALSE
&& G_UNLIKELY (!gst_ffmpegviddec_negotiate (ffmpegdec, context, picture,
FALSE)))
goto negotiate_failed;