From 3e683e300217ea43ba8f219060d8cdddbfd1028f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 14 Apr 2016 22:12:34 -0400 Subject: [PATCH] Add a call to av_set_parameters, found some code that says it must be called --- src/zm_videostore.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 01439ab92..5b032afca 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -114,6 +114,13 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in, audio_st = NULL; } +// set the output parameters (must be done even if no parameters) +ret = av_set_parameters( oc, NULL ); + if ( ret < 0 ) { + { + Fatal("Could not set parameters '%s': %s\n", filename, + av_make_error_string(ret).c_str()); + } /* open the output file, if needed */ if (!(fmt->flags & AVFMT_NOFILE)) { ret = avio_open2(&oc->pb, filename, AVIO_FLAG_WRITE,NULL,NULL);