]> git.sesse.net Git - mlt/commitdiff
fix getting sample_fmt name crashing on some versions
authorDan Dennedy <dan@dennedy.org>
Fri, 3 Feb 2012 00:26:33 +0000 (16:26 -0800)
committerDan Dennedy <dan@dennedy.org>
Fri, 3 Feb 2012 00:26:33 +0000 (16:26 -0800)
when av_get_sample_fmt_name exists but not avcodec_get_sample_fmt_name

src/modules/avformat/producer_avformat.c

index 2492315e7f2359fce07c633bda2c41b9f1b1b579..c94080dd06483062bd1e1ff40142bfa3057b93a4 100644 (file)
@@ -365,7 +365,7 @@ static mlt_properties find_default_streams( producer_avformat self )
                                if ( self->audio_index < 0 )
                                        self->audio_index = i;
                                mlt_properties_set( meta_media, key, "audio" );
-#if LIBAVCODEC_VERSION_MAJOR >= 53
+#if LIBAVUTIL_VERSION_INT >= ((50<<16)+(38<<8)+0)
                                snprintf( key, sizeof(key), "meta.media.%d.codec.sample_fmt", i );
                                mlt_properties_set( meta_media, key, av_get_sample_fmt_name( codec_context->sample_fmt ) );
 #elif (LIBAVCODEC_VERSION_INT >= ((51<<16)+(71<<8)+0))