diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-12-10 19:24:28 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-12-10 19:24:28 -0300 |
commit | 8680eece96316a64f461214f70f8a7b2f0ce1be1 (patch) | |
tree | bb8bd965f9980016b5e0aceb2f8bd52872f1b9d4 | |
parent | 9c2bcd7b768d77a79fe6e4b9b864ec60427d1bef (diff) |
videodecoder: avoid negotiating the pool twicevideodecoder-reconfigure-bufferpool
If the caps are the same and we already have a pool, keep using it
-rw-r--r-- | gst-libs/gst/video/gstvideodecoder.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 623b307a7..6e789e2bf 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -3809,9 +3809,12 @@ gst_video_decoder_negotiate_default (GstVideoDecoder * decoder) } prevcaps = gst_pad_get_current_caps (decoder->srcpad); - if (!prevcaps || !gst_caps_is_equal (prevcaps, state->caps)) + if (!prevcaps || !gst_caps_is_equal (prevcaps, state->caps)) { ret = gst_pad_set_caps (decoder->srcpad, state->caps); - else + if (ret || decoder->priv->pool == NULL) + /* Negotiate pool */ + ret = gst_video_decoder_negotiate_pool (decoder, state->caps); + } else ret = TRUE; if (prevcaps) gst_caps_unref (prevcaps); |