- if (!strcmp(s->stats_file_str, "-")) {
- s->stats_file = stdout;
- } else if (s->stats_file_str) {
- s->stats_file = fopen(s->stats_file_str, "w");
- if (!s->stats_file) {
- int err = AVERROR(errno);
- char buf[128];
- av_strerror(err, buf, sizeof(buf));
- av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n",
- s->stats_file_str, buf);
- return err;
+ if (s->stats_file_str) {
+ if (!strcmp(s->stats_file_str, "-")) {
+ s->stats_file = stdout;
+ } else {
+ s->stats_file = fopen(s->stats_file_str, "w");
+ if (!s->stats_file) {
+ int err = AVERROR(errno);
+ char buf[128];
+ av_strerror(err, buf, sizeof(buf));
+ av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n",
+ s->stats_file_str, buf);
+ return err;
+ }