Commit 70b2a7ae authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Philippe Gorley

encoder: check io context before finalizing

Change-Id: I5d7b757a7a7fc69e4f0cdb5e73092e659a7a06c5
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 749e4be7
......@@ -62,7 +62,7 @@ MediaEncoder::MediaEncoder()
MediaEncoder::~MediaEncoder()
{
if (outputCtx_) {
if (outputCtx_->priv_data)
if (outputCtx_->priv_data && outputCtx_->pb)
av_write_trailer(outputCtx_);
if (fileIO_) {
avio_close(outputCtx_->pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment