Skip to content
Snippets Groups Projects
Commit 1967fef7 authored by Anton Gladky's avatar Anton Gladky Committed by Dave DeMarle
Browse files

Fix compilation against libav 54 and OGG-Theora extension detection

Change-Id: Id74688bcfeefae3c5904e0719d498a185930220e
parent a70fdae4
Branches
Tags v6.0.0 v6.0.0.rc3
No related merge requests found
......@@ -153,7 +153,11 @@ int vtkFFMPEGWriterInternal::Start()
strcpy(this->avFormatContext->filename, this->Writer->GetFileName());
//create a stream for that file
#if LIBAVFORMAT_VERSION_MAJOR < 54
this->avStream = av_new_stream(this->avFormatContext, 0);
#else
this->avStream = avformat_new_stream(this->avFormatContext, 0);
#endif
if (!this->avStream)
{
vtkGenericWarningMacro (<< "Could not create video stream.");
......@@ -231,7 +235,11 @@ int vtkFFMPEGWriterInternal::Start()
vtkGenericWarningMacro (<< "Codec not found." );
return 0;
}
#if LIBAVFORMAT_VERSION_MAJOR < 54
if (avcodec_open(c, codec) < 0)
#else
if (avcodec_is_open(c) < 0)
#endif
{
vtkGenericWarningMacro (<< "Could not open codec.");
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment