After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781577 - Fails to play specific size theora files (vaapisink bufferpool issue)
Fails to play specific size theora files (vaapisink bufferpool issue)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.10.4
Other Linux
: Normal normal
: 1.11.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-21 09:41 UTC by Jussi Kukkonen
Modified: 2017-04-27 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG=4 gst-play sintel-trailer-480p.ogv (345.08 KB, text/plain)
2017-04-21 09:54 UTC, Jussi Kukkonen
  Details
vaapivideobufferpool: create allocator if needed (1.94 KB, patch)
2017-04-22 08:36 UTC, Víctor Manuel Jáquez Leal
none Details | Review
back port of the previous patch to branch 1.10 (2.10 KB, patch)
2017-04-24 14:28 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapivideobufferpool: create or reconfig allocator (2.08 KB, patch)
2017-04-25 13:07 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapivideobufferpool: fix leak of created allocator (1.04 KB, patch)
2017-04-27 05:50 UTC, Hyunjun Ko
committed Details | Review

Description Jussi Kukkonen 2017-04-21 09:41:22 UTC
https://download.blender.org/durian/trailer/sintel_trailer-480p.ogv fails to play with gstreamer + vaapi + intel-va (while the 720 version plays fine).

Here is a snippet of GST_DEBUG=3 gst-play sintel_trailer-480p.ogv (will attach a larger log):

---
ERROR         vaapivideopool gstvaapivideobufferpool.c:253:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> no allocator defined
FIXME           videodecoder gstvideodecoder.c:945:gst_video_decoder_drain_out:<theoradec0> Sub-class should implement drain()
ERROR         vaapivideopool gstvaapivideobufferpool.c:253:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool1> no allocator defined
ERROR         vaapivideopool gstvaapivideobufferpool.c:322:gst_vaapi_video_buffer_pool_alloc_buffer:<vaapivideobufferpool1> no GstAllocator in buffer pool
WARN              bufferpool gstbufferpool.c:306:do_alloc_buffer:<vaapivideobufferpool1> alloc function failed
WARN                oggdemux gstoggdemux.c:1297:gst_ogg_pad_stream_out:<oggdemux0> could not submit packet for stream 5f7da35b, error: -5
WARN                oggdemux gstoggdemux.c:4851:gst_ogg_demux_loop:<oggdemux0> error: Internal data stream error.
WARN                oggdemux gstoggdemux.c:4851:gst_ogg_demux_loop:<oggdemux0> error: streaming stopped, reason error (-5)
ERROR             gst-player gstplayer.c:1160:error_cb:<player0> ERROR: from element /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0: Internal data stream error.
---



This fails the same way:
---
gst-launch-1.0 -v  filesrc location=sintel_trailer-480p.ogv ! oggdemux ! theoradec  !  vaapisink
---
Again, the 720p file works.



We're seeing this on Yocto with
 * gstreamer & gstreamer-vaapi 1.10.4
 * libva and va-intel-driver 1.7.3

I've checked on Debian (which happened to have same versions) and curiously there are no problems there... I'm available for any further testing.
Comment 1 Jussi Kukkonen 2017-04-21 09:54:42 UTC
Created attachment 350191 [details]
GST_DEBUG=4 gst-play sintel-trailer-480p.ogv
Comment 2 Jussi Kukkonen 2017-04-21 10:03:13 UTC
> I've checked on Debian (which happened to have same versions) and curiously 
> there are no problems there..

Scratch that, vaapi wasn't being used on the Debian test (maybe because hardware is really old).


The hardware where I'm seeing the failure is a NUC 6i5SYH (Skylake).
Comment 3 Jussi Kukkonen 2017-04-21 13:53:24 UTC
I believe I can actually reproduce this in Debian (as mentioned on really old hw though).

I don't really understand the code but this seemed potentially interesting when I was comparing debug outputs of 480p vs 720p: width in last gst_vaapi_video_buffer_pool_set_config() call before failure is 10 pixels larger than I expected. The previous calls have the expected width. I don't see this happening with 720p.

0:00:00.063575837  6814 0x557671df90f0 DEBUG         vaapivideopool gstvaapivideobufferpool.c:144:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)864\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)0/1", size=(uint)645120, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL, options=(string)< GstBufferPoolOptionVaapiVideoMeta, GstBufferPoolOptionVideoMeta >;



Here's a full log:
---
GST_DEBUG=vaapivideopool:5 gst-launch-1.0 -v  filesrc location=sintel_trailer-480p.ogv ! oggdemux ! theoradec ! vaapisink
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'pipeline0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)NULL;
/GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:sink: caps = video/x-theora, width=(int)854, height=(int)480, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, streamheader=(buffer)< 807468656f72610302010036001e0003560001e00000000000180000000100000000000002000000fca0, 817468656f72612b000000586970682e4f7267206c69627468656f726120312e312032303039303832322028546875736e656c64612905000000140000005449544c453d53696e74656c20547261696c65721d0000004152544953543d44757269616e204f70656e204d6f766965205465616d3f000000434f505952494748543d28632920636f7079726967687420426c656e64657220466f756e646174696f6e207c2064757269616e2e626c656e6465722e6f7267300000004c4943454e53453d437265617469766520436f6d6d6f6e73204174747269627574696f6e20332e30206c6963656e73651a000000454e434f4445523d66666d706567327468656f72612d302e3234, 827468656f7261becd28f7b9cd6b18b5a9494a10739ce6318c5294a42108318c621084210840000000000000000000116dae536792c8fc5612fc78395b6ce62af568ab54281329245a10fe79399b8d66530978b255299389248219087c3c1d8e06a34180bc562a1409046221087c3c1c0c8602c14088381516dae536792c8fc5612fc78395b6ce62af568ab54281329245a10fe79399b8d66530978b255299389248219087c3c1d8e06a34180bc562a1409046221087c3c1c0c8602c1408838140b0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0c0c0f121414150d0d0e11121515140e0e0f12141515150e101113141515151011141515151515121314151515151514151515151515151515151515151515100c0b1014191b1c0d0d0e12151c1c1b0e0d1014191c1c1c0e1013161b1d1d1c1113191c1c1e1e1d14181b1c1d1e1e1d1b1c1d1d1e1e1e1e1d1d1d1d1e1e1e1d100b0a101828333d0c0c0e131a3a3c370e0d1018283945380e11161d3357503e1216253a446d674d182337405168715c31404e5767797865485c5f627064676313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313121215191a1a1a1a1214161a1a1a1a1a1516191a1a1a1a1a191a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1112161f24242424121418222424242416182124242424241f2224242424242424242424242424242424242424242424242424242424242424242424242424241112182f6363636312151a4263636363181a3863636363632f42636363636363636363636363636363636363636363636363636363636363636363636363636315151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515121212151718191b1212151718191b1c12151718191b1c1d151718191b1c1d1d1718191b1c1d1d1d18191b1c1d1d1d1e191b1c1d1d1d1e1e1b1c1d1d1d1e1e1e11111114171a1c20111114171a1c20221114171a1c20222514171a1c20222525171a1c20222525251a1c2022252525291c2022252525292a2022252525292a2a10101014181c2028101014181c2028301014181c2028304014181c2028304040181c2028304040401c202830404040602028304040406080283040404060808007c5e5c747d5edcec3f2faeb01a66277c851bc1d5137b72cc45ba8e37c07ee51244bdc1b192fad55234ccaec5d88409c8c1ed1d4c97ce61b5ab0d8caa52bcfb770fc93b8869995d8bb1042f914786ab506c64bc7e72ee625747b4792709f75548418ae6a9f75548aec6823394d283da3cebb921c0cad6636f9c3f8af0bc12f3b7fc271da61ed1e75244c602ead66653506bbe192d2147f6817a14f1b1ccbb2340ee507b479d729b6d77b057052a8c08be24ff8b45ac720fb8443b9b5fee21691b0cc595a0374e4ae450f76f3a92f5549508f3384e95acd82e378a115d81a481c9e287bb75dfff64c6f2d82907b3c0b4eb3b8e2c56630f80ca8e468d44d2c9b5ffd4a5b9d91c587c1f2704d2c9b4782de033eae81656045a63c995ffd4a5b909ad1ebcec06d445ff03d8f97d09b984ecfa5b60ad7026964d74c501e64eef55488024d7ebdcbd4e26976a0dceb36112d4370b2b0d3fc51e477e70aa929405d19d64c4a35f85958bc9c9a5da479db873108771ee6c1fe96d452808ae70c5eb5945958f245fdb772136d47d988cc3a13ffa64b61a8a5023845959baf3ed49e67eda8444b9b0e85a64f74e0b98f891cf7515522cac5f287def80da89ffd7a67846229065c314dcda2e3bd378600beb59a880ea1e1b7cbaa14e2b5b9e727688f49544d247f9a64613e617ceaec087f3a7716d8ae7d00a6a696870e5184d2bda24f35c8c37cc1ab986f69395d8c6e023dbf707710267b44b279d54a73327d02d61b80f3b360a26f659226b0dede72bc56660e5d47a64b8ff8f8aa95ac200faf63013e4dc6bda2e9cc22cad7301e12b6289bd923d0b59bfe1552297c46f3bfc9dc6682c15dcdd806a4c6d47b2c9134e8b593984c6fa85548cb93ace13fc6e0e1184c50db5f65d3bb15da41b97ce1279161f082a5246ef0b43f6293cad6389c72ea2437370cc1a50db5f66972bfe14b89c62cda2246484d2edadc7379dfbe0fad595828870ff719750542aa43b6809a5da4d68e6e19c37c03eb4fcf51c5d58567984edccb1e05222500da6975934857f4707b978b4c3be47d62b31671fe409ee6f50595d4a7709ee2304cdb597493285c17fbe0e8519e1dadf8e4c62fe015527224c9863e406ee0f62b475f2177388ca01b6b3692e77aefd6562aa4856bd9f72070fa31e2efd656745f276e46188346dacd9caa3288554b7019b46dae58cb77d09038785ec144df88ac5693b3a5af6747c882a52e07a311b6ac9a674617f761ba156b53dc468ba1e4b209bffb9070f35dd3de627244da88606758b2955917343a76134b27b1fe7d85a1f10f9c31bccb73f3b47af338b2b5c68e9102697693da3029a8ce0b45abe03e71fb79c0d141212b69b5f7cc2e047177ce559654a58b375087ccb0a551fba8601731e1bd659697812a66dac9a479f278ed13da270faea551cb20d12a66dac9ec6fef07689467e1d61c2db0ae06e630ce207cff95350b50ce3b3da0663499b6b2c993abeb2c5de1c18e08a3dc6e4ffaee50545206436d5334ce5a18e1dba8ab2c43f1e233d92f7168dd0ad17a81934ccdb5c584d3f6815d853508be3a9391f92fb746f3815523abf84e618f23eb421a3bfd00cd106daa44d2e91e5e96565de6e29dcf385bf011650dd01caf0904d2b6d74ce3c1fbb63416564ef7aa852f8624836d52b49b3ca885bb875e87e611a2bfc57609f95abbb4150dea530076ba2e0b7a7de884bc90ccdb54ad26c98e1ff8729d446b2b1bd4a50f011f4245ec18b21b6a99a672ffec0394eba82dfab78b11763ca5538242f4ac06da994cd33c6e4f688517300f5f28fd65646efadc7952916fd239f4810acac8c179332699b036d71bbfea21da74b471b88ce42e98bcc1962699b6d68b7d91540523aeec56949fff885c44dfc148f6134a3a809d8707f97c37b8c59f3596044484ada6d63efcbd6d42aa4b8cbbf02304d2b6d749334545ff07eebd70c3141b96d8ac8799c554846484a69336d73a2f72c7021f3e076ca2fed1ef5c6e27bac57000a31bff4fcc0a6a16aef0120ccd266dacb961123eec2b42f7a38fb71b9d0c4c931a66db59546092f47ca9a880f3eacb09fb7b716f07f1423713c9f39895524084f7fb4b2b1df51b80a036d5934cf16132f96ef06e3f4eb81a66db530a19637cd24680e4f65fa12aa444f2dad61df5c0812389485c9d7fdee554965644273e1b6aa185eb8cb1699fb33cb63075ef14aa7d6828036d52b49a4ce3c7921bee40fddb065109fcb15ee29a90387508f13f2aec05f1ddf2d506048256931b6b9e58c4ddebbfc5350efe756c03d238b95959e6e42fcbd2306236d6526699e5713d1c059591750a9a8237cb8bc3299a6728db5c7091cada203cdde8fe7ef808dca47d3faaa91bf9010947711c58ac2e4abc699b6d4c26658ff6f41bc5e82d7ff77c785958255c32c5a666daa6617cf47293a20470aaa4a519bbbea2202471615b9250ba6617fe36d4cb1699fca16cfe1ec351552808c5958e37ec95c89944e6dabff8658b4ccbad617f5e913c921103cb54d410dce7f2730241334ccdb5972c7bb0af70a23457fce1d7a0ebf4e480db53299a672b1c2fbaa5300f1cfc288addcb1c7aacee38453510fa5bcf84046a12128699b6d4c26658df76e1ff7c58ac9fe75104601962d3336d5330bee97f4ff72b2b535087c80dd124516bd70ebb1e9c942d3f9832c5a666daae617cfdee82a2978e2c2356e92fc85148378c9218880703a0c7067916cebee4cf8d747fb72a3bf4b2b792aaa46f192431100e07418e0cf22d9d7dc99f1ae8ff6e5477e9656f255548de324862201c0e831c19e45b3afb933e35d1fedca8efd2cade4aaa91552709fa80112f04cd3336d65ca463843e2cac5bcbef45dd91d1fee0b6386a52f5cbfa0595c079b85c90c188ca66999b6b2df3f077f22e80fe7e7ca552cac1f5117ade14070485e94699b6d49996385dda35bd05959cad7d3f846e1276dfd2042747e943099962bcd336dadd444a6a293c881f4f476e39f42bb23806e2d3f1962d33266179b6b74bd490d42144f56574aa403791e01f265f74eb46ba3fd8c706794bcbb70a3a8c810a3240945d6b0bc9944e77d3ffac560db573c1962d33dfdf225549552808c5958e37ec95c89944e6dabff8658b4ccbad617f5e913c921 >
/GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)854, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)2:4:5:3, framerate=(fraction)24/1
0:00:00.063166646  6814 0x557671df90f0 DEBUG         vaapivideopool gstvaapivideobufferpool.c:144:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)854\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)2:4:5:3\,\ framerate\=\(fraction\)24/1", size=(uint)645120, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"\(GstVaapiVideoAllocator\)\ vaapivideoallocator0", params=(GstAllocationParams)NULL, options=(string)< GstBufferPoolOptionVaapiVideoMeta, GstBufferPoolOptionVideoMeta >;
/GstPipeline:pipeline0/GstVaapiSink:vaapisink0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)854, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)2:4:5:3, framerate=(fraction)24/1
0:00:00.063482964  6814 0x557671df90f0 DEBUG         vaapivideopool gstvaapivideobufferpool.c:144:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)854\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)2:4:5:3\,\ framerate\=\(fraction\)24/1", size=(uint)645120, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL, options=(string)< GstBufferPoolOptionVaapiVideoMeta, GstBufferPoolOptionVideoMeta >;
0:00:00.063575837  6814 0x557671df90f0 DEBUG         vaapivideopool gstvaapivideobufferpool.c:144:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)864\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)0/1", size=(uint)645120, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL, options=(string)< GstBufferPoolOptionVaapiVideoMeta, GstBufferPoolOptionVideoMeta >;
0:00:00.063652961  6814 0x557671df90f0 ERROR         vaapivideopool gstvaapivideobufferpool.c:253:gst_vaapi_video_buffer_pool_set_config:<vaapivideobufferpool0> no allocator defined
0:00:00.075461973  6814 0x557671df90f0 ERROR         vaapivideopool gstvaapivideobufferpool.c:322:gst_vaapi_video_buffer_pool_alloc_buffer:<vaapivideobufferpool0> no GstAllocator in buffer pool
ERROR: from element /GstPipeline:pipeline0/GstOggDemux:oggdemux0: Internal data stream error.
Additional debug info:
gstoggdemux.c(4851): gst_ogg_demux_loop (): /GstPipeline:pipeline0/GstOggDemux:oggdemux0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 4 Víctor Manuel Jáquez Leal 2017-04-22 08:36:28 UTC
Created attachment 350228 [details] [review]
vaapivideobufferpool: create allocator if needed

Sometimes a video decoder could set different buffer pool
configurations, because their frame size changes. In this case we
did not reconfigured the allocator.

This patch enables this use case, creating a new allocator inside
the VAAPI buffer pool if the caps changed, if it is not dmabuf-based.
If so, it is just reconfigured, since it doesn't have a surface pool.
Comment 5 Víctor Manuel Jáquez Leal 2017-04-22 08:37:23 UTC
Comment on attachment 350228 [details] [review]
vaapivideobufferpool: create allocator if needed

this is a naive approach to the solution. It can be improved a lot. Still it solves the problem.
Comment 6 Jussi Kukkonen 2017-04-24 07:43:47 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #4)
> Created attachment 350228 [details] [review] [review]
> vaapivideobufferpool: create allocator if needed
> 
> Sometimes a video decoder could set different buffer pool
> configurations, because their frame size changes. In this case we
> did not reconfigured the allocator.
> 
> This patch enables this use case, creating a new allocator inside
> the VAAPI buffer pool if the caps changed, if it is not dmabuf-based.
> If so, it is just reconfigured, since it doesn't have a surface pool.

Thanks for the really fast response, much appreciated.

The patch doesn't fix the issue though: while gst_buffer_pool_config_get_allocator() call a little before the patch succeeds, 'allocator' is still NULL so the code in the patch is never executed.
Comment 7 Jussi Kukkonen 2017-04-24 07:46:46 UTC
Oops, hit Save a little too fast:

I've tested this with a patch that I backported to 1.10.4 -- it seemed trivial at least, I removed last argument from gst_vaapi_video_allocator_new() call.
Comment 8 Víctor Manuel Jáquez Leal 2017-04-24 10:58:04 UTC
(In reply to Jussi Kukkonen from comment #6)
> (In reply to Víctor Manuel Jáquez Leal from comment #4)
> > Created attachment 350228 [details] [review] [review] [review]
> > vaapivideobufferpool: create allocator if needed
> > 
> > Sometimes a video decoder could set different buffer pool
> > configurations, because their frame size changes. In this case we
> > did not reconfigured the allocator.
> > 
> > This patch enables this use case, creating a new allocator inside
> > the VAAPI buffer pool if the caps changed, if it is not dmabuf-based.
> > If so, it is just reconfigured, since it doesn't have a surface pool.
> 
> Thanks for the really fast response, much appreciated.
> 
> The patch doesn't fix the issue though: while
> gst_buffer_pool_config_get_allocator() call a little before the patch
> succeeds, 'allocator' is still NULL so the code in the patch is never
> executed.

I worked the patch in master. I didn't back port it to 1.10. Perhaps it would need more work.
Comment 9 Víctor Manuel Jáquez Leal 2017-04-24 14:28:44 UTC
Created attachment 350304 [details] [review]
back port of the previous patch to branch 1.10
Comment 10 Víctor Manuel Jáquez Leal 2017-04-24 14:49:55 UTC
These two patches (per master and 1.10) are just quick fixes. They need polish where the buffer pool could create its allocator if it is not assigned in its configuration from outside. And, believe or not, this change depends on the solution for bug #779145
Comment 11 Víctor Manuel Jáquez Leal 2017-04-25 13:07:23 UTC
Created attachment 350393 [details] [review]
vaapivideobufferpool: create or reconfig allocator

Sometimes a video decoder could set different buffer pool
configurations, because their frame size changes. In this case we
did not reconfigure the allocator.

This patch enables this use case, creating a new allocator inside
the VAAPI buffer pool if the caps changed, if it is not dmabuf-based.
If so, it is just reconfigured, since it doesn't have a surface pool.
Comment 12 Víctor Manuel Jáquez Leal 2017-04-25 13:17:41 UTC
Comment on attachment 350393 [details] [review]
vaapivideobufferpool: create or reconfig allocator

Attachment 350393 [details] pushed as 158b44f - vaapivideobufferpool: create or reconfig allocator
Comment 13 Víctor Manuel Jáquez Leal 2017-04-25 13:21:44 UTC
Comment on attachment 350304 [details] [review]
back port of the previous patch to branch 1.10

for branch 1.10 commit 59a731be6b9a1a27bf8df5b276c96a1b9d1c715f
Comment 14 Víctor Manuel Jáquez Leal 2017-04-25 13:22:15 UTC
Comment on attachment 350304 [details] [review]
back port of the previous patch to branch 1.10

for branch 1.10 commit 59a731be6b9a1a27bf8df5b276c96a1b9d1c715f
Comment 15 Hyunjun Ko 2017-04-27 05:50:39 UTC
Created attachment 350521 [details] [review]
vaapivideobufferpool: fix leak of created allocator

Since it's created by itself, it should be unref-counted
after gst_buffer_pool_config_set_allocator call. Afterwards,
this allocator will be ref-counted again when assigning to priv->allocator.

--------------------

I found this leak while I'm working on other task.
IMHO, this leak could be critical because this leads to leak of VaapiDisplay.
Comment 16 Víctor Manuel Jáquez Leal 2017-04-27 09:06:40 UTC
Comment on attachment 350521 [details] [review]
vaapivideobufferpool: fix leak of created allocator

on master:

commit cce5ce4a9dd74f83224e437af9344db6b8daefdb
Author: Hyunjun Ko <zzoon@igalia.com>
Date:   Thu Apr 27 14:42:55 2017 +0900

    vaapivideobufferpool: fix leak of created allocator
Comment 17 Víctor Manuel Jáquez Leal 2017-04-27 09:27:50 UTC
on 1.10

commit 31e995f4a6893711cdee769b2ff0e371cbd859b8
Date:   Thu Apr 27 14:42:55 2017 +0900

    vaapivideobufferpool: fix leak of created allocator