Skip to content
Snippets Groups Projects
Commit 72ea643f authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud
Browse files

accel: fix segfault if codec context not initialized

Change-Id: I5cd9cc6dd57d3c6447b397cc486cb82c48b2ea85
parent ea15cbe4
Branches
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ MediaDecoder::MediaDecoder() :
MediaDecoder::~MediaDecoder()
{
#ifdef RING_ACCEL
if (decoderCtx_->hw_device_ctx)
if (decoderCtx_ && decoderCtx_->hw_device_ctx)
av_buffer_unref(&decoderCtx_->hw_device_ctx);
#endif
if (decoderCtx_)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment