Skip to content
Snippets Groups Projects
Commit 70b2a7ae authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Philippe Gorley
Browse files

encoder: check io context before finalizing


Change-Id: I5d7b757a7a7fc69e4f0cdb5e73092e659a7a06c5
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 749e4be7
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment