static void opt_output_file(const char *filename)
{
AVFormatContext *oc;
- int use_video, use_audio, use_subtitle;
+ int err, use_video, use_audio, use_subtitle;
int input_has_video, input_has_audio, input_has_subtitle;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
}
/* open the file */
- if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
- fprintf(stderr, "Could not open '%s'\n", filename);
+ if ((err = url_fopen(&oc->pb, filename, URL_WRONLY)) < 0) {
+ print_error(filename, err);
av_exit(1);
}
}