Skip to content

Commit

Permalink
FFmpegWriter: Remove unreachable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Jun 8, 2020
1 parent c29174f commit 7a91ca1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/FFmpegWriter.cpp
Expand Up @@ -552,15 +552,15 @@ void FFmpegWriter::SetOption(StreamType stream, std::string name, std::string va
}
else if (strstr(info.vcodec.c_str(), "rav1e") != NULL) {
// Set number of tiles to a fixed value
// TODO Let user choose number of tiles
// TODO Let user choose number of tiles
av_opt_set_int(c->priv_data, "qp", std::min(std::stoi(value),255), 0);
av_opt_set_int(c->priv_data, "speed", 7, 0);
av_opt_set_int(c->priv_data, "tile-rows", 2, 0); // number of rows
av_opt_set_int(c->priv_data, "tile-columns", 4, 0); // number of columns
}
else if (strstr(info.vcodec.c_str(), "aom") != NULL) {
// Set number of tiles to a fixed value
// TODO Let user choose number of tiles
// TODO Let user choose number of tiles
// libaom doesn't have qp only crf
av_opt_set_int(c->priv_data, "crf", std::min(std::stoi(value),63), 0);
av_opt_set_int(c->priv_data, "tile-rows", 1, 0); // log2 of number of rows
Expand Down Expand Up @@ -691,15 +691,8 @@ void FFmpegWriter::WriteFrame(std::shared_ptr<Frame> frame) {

// Write the frames once it reaches the correct cache size
if ((int)spooled_video_frames.size() == cache_size || (int)spooled_audio_frames.size() == cache_size) {
// Is writer currently writing?
if (!is_writing)
// Write frames to video file
write_queued_frames();

else {
// Write frames to video file
write_queued_frames();
}
// Write frames to video file
write_queued_frames();
}

// Keep track of the last frame added
Expand Down

0 comments on commit 7a91ca1

Please sign in to comment.