Merge pull request #94 from AsamK/correct_libav_version

Fix libav version check
This commit is contained in:
Cyril Soler 2015-09-07 20:36:03 -04:00
commit 63e38af19c

View File

@ -325,7 +325,7 @@ FFmpegVideo::FFmpegVideo()
//AVCodecID codec_id = AV_CODEC_ID_H264 ;
//AVCodecID codec_id = AV_CODEC_ID_MPEG2VIDEO;
#if LIBAVCODEC_VERSION_MAJOR < 55
#if LIBAVCODEC_VERSION_MAJOR < 54
CodecID codec_id = CODEC_ID_MPEG4;
#else
AVCodecID codec_id = AV_CODEC_ID_MPEG4;
@ -387,7 +387,7 @@ FFmpegVideo::FFmpegVideo()
*/
encoding_context->gop_size = 100;
//encoding_context->max_b_frames = 1;
#if LIBAVCODEC_VERSION_MAJOR < 55
#if LIBAVCODEC_VERSION_MAJOR < 54
encoding_context->pix_fmt = PIX_FMT_YUV420P; //context->pix_fmt = PIX_FMT_RGB24;
if (codec_id == CODEC_ID_H264) {
#else
@ -435,7 +435,7 @@ FFmpegVideo::FFmpegVideo()
decoding_context->width = encoding_context->width;
decoding_context->height = encoding_context->height;
#if LIBAVCODEC_VERSION_MAJOR < 55
#if LIBAVCODEC_VERSION_MAJOR < 54
decoding_context->pix_fmt = PIX_FMT_YUV420P;
#else
decoding_context->pix_fmt = AV_PIX_FMT_YUV420P;