typed-ffmpeg icon indicating copy to clipboard operation
typed-ffmpeg copied to clipboard

判斷 options 是否是 required

Open lucemia opened this issue 1 year ago • 1 comments
trafficstars

          看起來 ffmpeg options 都是 Optional , required 依賴 init 程式檢查
if (!lensfun->make || !lensfun->model) {
        const lfCamera *const *cameras = lf_db_get_cameras(db);

        av_log(ctx, AV_LOG_FATAL, "Option \"make\" or option \"model\" not specified\n");
        av_log(ctx, AV_LOG_INFO, "Available values for \"make\" and \"model\":\n");
        for (int i = 0; cameras && cameras[i]; i++)
            av_log(ctx, AV_LOG_INFO, "\t%s\t%s\n", cameras[i]->Maker, cameras[i]->Model);
        lf_db_destroy(db);
        return AVERROR(EINVAL);
    } 

Originally posted by @lucemia in https://github.com/livingbio/typed-ffmpeg/issues/145#issuecomment-1887222235

lucemia avatar Jan 11 '24 14:01 lucemia

make all options optional

lucemia avatar Jan 11 '24 14:01 lucemia