Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix segfault in libav_streamer destructor (resolves #59) #60

Merged
merged 1 commit into from
Feb 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/libav_streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ LibavStreamer::~LibavStreamer()
}
if (io_buffer_)
delete io_buffer_;
if (format_context_->pb)
av_free(format_context_->pb);
if (format_context_)
if (format_context_) {
if (format_context_->pb)
av_free(format_context_->pb);
avformat_free_context(format_context_);
}
if (sws_context_)
sws_freeContext(sws_context_);
}
Expand Down