diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-08-21 23:04:20 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-08-21 23:04:20 +0300 |
commit | a24e333fca7a73496fa824b65f770382403b676c (patch) | |
tree | e57d94b5aeb0f0bc2914c5554102ff3fc343dd9c /libmpcodecs/vd_ffmpeg.c | |
parent | 68df2b2b3f9a3310e39b509b2ed7208dc0e95123 (diff) | |
download | mpv-a24e333fca7a73496fa824b65f770382403b676c.tar.bz2 mpv-a24e333fca7a73496fa824b65f770382403b676c.tar.xz |
ad_ffmpeg: free resources on init failure
ad_ffmpeg init() function did not free resources if opening failed.
Outside code (dec_audio.c) does not automatically call uninit() if
init() returns failure, and the uninit function would have crashed in
some cases had it been called (it did freed lavc_context->extradata,
but lavc_context could have been NULL after early init failure). Add
explicit calls to uninit() after failure and make uninit function safe
to call at any point.
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
0 files changed, 0 insertions, 0 deletions