Add a call to av_set_parameters, found some code that says it must be called

This commit is contained in:
Isaac Connor 2016-04-14 22:12:34 -04:00
parent bcec1813e6
commit 3e683e3002
1 changed files with 7 additions and 0 deletions

View File

@ -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);