Browse Source

vaapi_encode: Discard output buffer if picture submission fails

Previously this was leaking, though it actually hit an assert making
sure that the buffer had already been cleared when freeing the picture.

(cherry picked from commit 17aeee5832)
tags/n3.4
Mark Thompson 9 years ago
parent
commit
92bd089745
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/vaapi_encode.c

+ 2
- 0
libavcodec/vaapi_encode.c View File

@@ -428,6 +428,8 @@ fail:
fail_at_end:
av_freep(&pic->codec_picture_params);
av_frame_free(&pic->recon_image);
av_buffer_unref(&pic->output_buffer_ref);
pic->output_buffer = VA_INVALID_ID;
return err;
}



Loading…
Cancel
Save