Skip to content

Commit

Permalink
fix(ffmpeg): don't underflow while pre-rolling
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Aug 17, 2018
1 parent 00aba46 commit dd44db0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/ffmpeg/producer/av_producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,11 @@ struct AVProducer::Impl
if (buffer_.empty() || (frame_flush_ && buffer_.size() < 4) || (prerolling_ && buffer_.size() < buffer_capacity_ / 4)) {
if (buffer_eof_) {
return frame_;
} else {
}
if (!prerolling_) {
graph_->set_tag(diagnostics::tag_severity::WARNING, "underflow");
return core::draw_frame{};
}
return core::draw_frame{};
}

auto frame = core::draw_frame(make_frame(this, *frame_factory_, buffer_[0].video, buffer_[0].audio));
Expand Down

0 comments on commit dd44db0

Please sign in to comment.