]> git.sesse.net Git - mlt/commitdiff
Fix version support for AVCodec:colorspace.
authorDan Dennedy <dan@dennedy.org>
Thu, 14 Oct 2010 02:23:03 +0000 (19:23 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 14 Oct 2010 02:23:03 +0000 (19:23 -0700)
src/modules/avformat/consumer_avformat.c
src/modules/avformat/producer_avformat.c

index a10ad6b2356757fce10608b11bfc335368407b84..8e1baef668a9cd221d09883a3166065bcaa718f7 100644 (file)
@@ -587,7 +587,7 @@ static AVStream *add_video_stream( mlt_consumer this, AVFormatContext *oc, int c
                c->pix_fmt = pix_fmt ? avcodec_get_pix_fmt( pix_fmt ) : PIX_FMT_YUV420P;
 #endif
                
-#if LIBAVUTIL_VERSION_INT > ((52<<16)+(28<<8)+0)
+#if LIBAVCODEC_VERSION_INT > ((52<<16)+(28<<8)+0)
                switch ( colorspace )
                {
                case 170:
index 2f5cc553524461d4594817f4f42c747e8e3b17f1..12933d5cf75802a082d0a6b133d3269634ac1d13 100644 (file)
@@ -283,7 +283,7 @@ static mlt_properties find_default_streams( mlt_properties meta_media, AVFormatC
                                snprintf( key, sizeof(key), "meta.media.%d.codec.sample_aspect_ratio", i );
                                mlt_properties_set_double( meta_media, key, av_q2d( codec_context->sample_aspect_ratio ) );
                                snprintf( key, sizeof(key), "meta.media.%d.codec.colorspace", i );
-#if LIBAVUTIL_VERSION_INT > ((52<<16)+(28<<8)+0)
+#if LIBAVCODEC_VERSION_INT > ((52<<16)+(28<<8)+0)
                                mlt_properties_set_int( meta_media, key, codec_context->colorspace );
 #endif
                                break;
@@ -1543,7 +1543,7 @@ static int video_codec_init( producer_avformat this, int index, mlt_properties p
 
                // Set the YUV colorspace from override or detect
                this->colorspace = mlt_properties_get_int( properties, "force_colorspace" );
-#if LIBAVUTIL_VERSION_INT > ((52<<16)+(28<<8)+0)               
+#if LIBAVCODEC_VERSION_INT > ((52<<16)+(28<<8)+0)              
                if ( ! this->colorspace )
                {
                        switch ( this->video_codec->colorspace )