OSDN Git Service

mpegvideo: allocate hwaccel privdata after the frame buffer
authorHendrik Leppkes <h.leppkes@gmail.com>
Mon, 18 Mar 2013 17:54:44 +0000 (18:54 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 19 Mar 2013 10:20:22 +0000 (11:20 +0100)
commitc3ebfcd6e1327ca7bbcaee822e593c2da6cfd352
treec783c25637430828b876fedacc7b9f8bc3a31850
parent9c9ede44f37e291677c0db1c5fabf1c3f6106008
mpegvideo: allocate hwaccel privdata after the frame buffer

This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/mpegvideo.c