Skip to content

Commit

Permalink
libav: Warn on using options that don't work with the libav encoder
Browse files Browse the repository at this point in the history
The circular, segment, save_pts and split functions don't work when
using the libav encoder.  Loudly warn if the user tries to use one of
these options.

Signed-off-by: Naushir Patuck <[email protected]>
  • Loading branch information
naushir authored and davidplowman committed Mar 5, 2024
1 parent 053d2c5 commit 1f2f08a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions encoder/libav_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ LibAvEncoder::LibAvEncoder(VideoOptions const *options, StreamInfo const &info)
: Encoder(options), output_ready_(false), abort_video_(false), abort_audio_(false), video_start_ts_(0),
audio_samples_(0), in_fmt_ctx_(nullptr), out_fmt_ctx_(nullptr), output_file_(options->output)
{
if (options->circular || options->segment || !options->save_pts.empty() || options->split)
LOG_ERROR("\nERROR: Pi 5 and libav encoder does not currently support the circular, segment, save_pts or "
"split command line options, they will be ignored!\n");

avdevice_register_all();

if (options->verbose >= 2)
Expand Down

0 comments on commit 1f2f08a

Please sign in to comment.