diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-07-28 16:16:10 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-07-28 16:16:10 -0400 |
commit | 0a0ee427526eda958368398c9cf0ebfb5a613eff (patch) | |
tree | 34925ada08de3b49f7b547e7b2cc3d5ca1772649 /ext/libav/gstavviddec.c | |
parent | 70443730a509037ea85331dcf2b6e53ad403f77a (diff) | |
download | gst-libav-0a0ee427526eda958368398c9cf0ebfb5a613eff.tar.gz |
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
Diffstat (limited to 'ext/libav/gstavviddec.c')
-rw-r--r-- | ext/libav/gstavviddec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index 16e4ea7..55ec594 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -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; |