When ret is checked here, it was never assigned anything, making this check useless, as highlighted by Coverity. It seems to be a copy paste mistake given that opt_match_per_stream_str does not return an error code that could be checked and the previous value assigned to ret is already checked above. So just remove this check.
Unified · Split
| @@ -1315,8 +1315,6 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, · 1314 unmodified lines | |||
| 1315 | const char *format = "{fidx} {sidx} {n} {t}"; | 1315 | const char *format = "{fidx} {sidx} {n} {t}"; |
| 1316 | 1316 | ||
| 1317 | opt_match_per_stream_str(ost, &o->enc_stats_pre_fmt, oc, st, &format); | 1317 | opt_match_per_stream_str(ost, &o->enc_stats_pre_fmt, oc, st, &format); |
| 1318 | if (ret < 0) | ||
| 1319 | goto fail; | ||
| 1320 | 1318 | ||
| 1321 | ret = enc_stats_init(ost, &ost->enc_stats_pre, 1, enc_stats_pre, format); | 1319 | ret = enc_stats_init(ost, &ost->enc_stats_pre, 1, enc_stats_pre, format); |
| 1322 | if (ret < 0) | 1320 | if (ret < 0) |