Skip to content

Commit ccf1440

Browse files
fix: strip loop option before decoder open to avoid unrecognized warning
The loop=1 camera option is also parsed when opening the video decoder, which logged "Option loop not recognized by ffmpeg". Strip it alongside the other demuxer-level options (reorder_queue_size, probesize) before avcodec_open2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7105827 commit ccf1440

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/zm_monitor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3581,9 +3581,11 @@ int Monitor::OpenDecoder() {
35813581

35823582
if (!options.empty()) {
35833583
av_dict_parse_string(&opts, options.c_str(), "=", ",", 0);
3584-
// reorder_queparse for avforpts, mOpcodec
3584+
// These are demuxer/camera-level options consumed elsewhere; strip them
3585+
// so the decoder doesn't report them as unrecognized.
35853586
av_dict_set(&opts, "reorder_queue_size", nullptr, AV_DICT_MATCH_CASE);
35863587
av_dict_set(&opts, "probesize", nullptr, AV_DICT_MATCH_CASE);
3588+
av_dict_set(&opts, "loop", nullptr, AV_DICT_MATCH_CASE);
35873589
}
35883590
if (chosen_codec_data->options_defaults) {
35893591
AVDictionary *opts_defaults = nullptr;

0 commit comments

Comments
 (0)