[vlc-devel] commit: avcodec: use AV_VERSION_INT. ( Rémi Duraffort )

git version control git at videolan.org
Thu Sep 3 10:16:59 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Sep  3 10:16:17 2009 +0200| [c141073fcd02ff6fd3457e3032f76925d65d2fb5] | committer: Rémi Duraffort 

avcodec: use AV_VERSION_INT.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c141073fcd02ff6fd3457e3032f76925d65d2fb5
---

 modules/codec/avcodec/audio.c   |    4 ++--
 modules/codec/avcodec/encoder.c |    8 ++++----
 modules/codec/avcodec/video.c   |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index b05cb0f..4fee775 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -108,7 +108,7 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
 
     p_sys->p_context->block_align = p_dec->fmt_in.audio.i_blockalign;
     p_sys->p_context->bit_rate = p_dec->fmt_in.i_bitrate;
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
     p_sys->p_context->bits_per_sample = p_dec->fmt_in.audio.i_bitspersample;
 #else
     p_sys->p_context->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample;
@@ -315,7 +315,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
     p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE;
     memset( &p_block->p_buffer[p_block->i_buffer], 0, FF_INPUT_BUFFER_PADDING_SIZE );
 
-#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 0, 0 )
     i_used = avcodec_decode_audio2( p_sys->p_context,
                                    (int16_t*)p_sys->p_output, &i_output,
                                    p_block->p_buffer, p_block->i_buffer );
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 5cca7ea..166ed8e 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -515,7 +515,7 @@ int OpenEncoder( vlc_object_t *p_this )
             }
         }
 
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
         if ( p_sys->b_trellis )
             p_context->flags |= CODEC_FLAG_TRELLIS_QUANT;
 #else
@@ -875,7 +875,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
             if ( current_date + HURRY_UP_GUARD3 > frame.pts )
             {
                 p_sys->p_context->mb_decision = FF_MB_DECISION_SIMPLE;
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
                 p_sys->p_context->flags &= ~CODEC_FLAG_TRELLIS_QUANT;
 #else
                 p_sys->p_context->trellis = 0;
@@ -888,7 +888,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
 
                 if ( current_date + HURRY_UP_GUARD2 > frame.pts )
                 {
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
                     p_sys->p_context->flags &= ~CODEC_FLAG_TRELLIS_QUANT;
 #else
                     p_sys->p_context->trellis = 0;
@@ -899,7 +899,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
                 }
                 else
                 {
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
                     if ( p_sys->b_trellis )
                         p_sys->p_context->flags |= CODEC_FLAG_TRELLIS_QUANT;
 #else
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 77c461e..d5481bc 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -210,7 +210,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     /*  ***** Get configuration of ffmpeg plugin ***** */
     p_sys->p_context->workaround_bugs =
         config_GetInt( p_dec, "ffmpeg-workaround-bugs" );
-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 0, 0 )
     p_sys->p_context->error_resilience =
         config_GetInt( p_dec, "ffmpeg-error-resilience" );
 #else




More information about the vlc-devel mailing list