Readd checking of micro version in zm_mpeg.cpp to fix compilation issue
This commit is contained in:
parent
f6d69e02b5
commit
818a5256e4
|
@ -178,7 +178,7 @@ protected:
|
|||
};
|
||||
#endif // HAVE_LIBSWSCALE && HAVE_LIBAVUTIL
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(54, 25, 0, 51, 100)
|
||||
#if !LIBAVCODEC_VERSION_CHECK(54, 25, 0, 51, 100)
|
||||
#define AV_CODEC_ID_NONE CODEC_ID_NONE
|
||||
#define AV_CODEC_ID_PCM_MULAW CODEC_ID_PCM_MULAW
|
||||
#define AV_CODEC_ID_PCM_ALAW CODEC_ID_PCM_ALAW
|
||||
|
|
|
@ -43,10 +43,10 @@ VideoStream::MimeData VideoStream::mime_data[] = {
|
|||
void VideoStream::Initialise( )
|
||||
{
|
||||
if ( logDebugging() )
|
||||
av_log_set_level( AV_LOG_DEBUG );
|
||||
av_log_set_level( AV_LOG_DEBUG );
|
||||
else
|
||||
av_log_set_level( AV_LOG_QUIET );
|
||||
|
||||
av_log_set_level( AV_LOG_QUIET );
|
||||
|
||||
av_register_all( );
|
||||
#if LIBAVFORMAT_VERSION_CHECK(53, 13, 0, 19, 0)
|
||||
avformat_network_init();
|
||||
|
@ -58,15 +58,15 @@ void VideoStream::SetupFormat( )
|
|||
{
|
||||
/* allocate the output media context */
|
||||
ofc = NULL;
|
||||
#if LIBAVFORMAT_VERSION_CHECK(53, 2, 0, 2, 0)
|
||||
#if (LIBAVFORMAT_VERSION_CHECK(53, 2, 0, 2, 0) && (LIBAVFORMAT_VERSION_MICRO >= 100))
|
||||
avformat_alloc_output_context2( &ofc, NULL, format, filename );
|
||||
#else
|
||||
AVFormatContext *s= avformat_alloc_context();
|
||||
if(!s)
|
||||
if(!s)
|
||||
{
|
||||
Fatal( "avformat_alloc_context failed %d \"%s\"", (size_t)ofc, av_err2str((size_t)ofc) );
|
||||
}
|
||||
|
||||
|
||||
AVOutputFormat *oformat;
|
||||
if (format) {
|
||||
#if LIBAVFORMAT_VERSION_CHECK(52, 45, 0, 45, 0)
|
||||
|
@ -186,7 +186,7 @@ void VideoStream::SetupCodec( int colours, int subpixelorder, int width, int hei
|
|||
}
|
||||
else
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0)
|
||||
#if (LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0) && (LIBAVFORMAT_VERSION_MICRO >= 100))
|
||||
Debug( 1, "Could not find codec \"%s\". Using default \"%s\"", codec_name, avcodec_get_name( codec_id ) );
|
||||
#else
|
||||
Debug( 1, "Could not find codec \"%s\". Using default \"%d\"", codec_name, codec_id );
|
||||
|
@ -202,14 +202,14 @@ void VideoStream::SetupCodec( int colours, int subpixelorder, int width, int hei
|
|||
codec = avcodec_find_encoder( codec_id );
|
||||
if ( !codec )
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0)
|
||||
#if (LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0) && (LIBAVFORMAT_VERSION_MICRO >= 100))
|
||||
Fatal( "Could not find encoder for '%s'", avcodec_get_name( codec_id ) );
|
||||
#else
|
||||
Fatal( "Could not find encoder for '%d'", codec_id );
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0)
|
||||
#if (LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 11, 0) && (LIBAVFORMAT_VERSION_MICRO >= 100))
|
||||
Debug( 1, "Found encoder for '%s'", avcodec_get_name( codec_id ) );
|
||||
#else
|
||||
Debug( 1, "Found encoder for '%d'", codec_id );
|
||||
|
|
Loading…
Reference in New Issue