Fix avformat module compilation since AVStream gets sample_aspect_ratio from 52.21...
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 6 Dec 2008 13:45:11 +0000 (14:45 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 6 Dec 2008 13:45:11 +0000 (14:45 +0100)
modules/demux/avformat/mux.c

index a059c49..3e98975 100644 (file)
@@ -252,8 +252,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
                    &codec->sample_aspect_ratio.den,
                    i_aspect_num * (int64_t)codec->height,
                    i_aspect_den * (int64_t)codec->width, 1 << 30 );
+#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(21<<8)+0)
         stream->sample_aspect_ratio.num = codec->sample_aspect_ratio.num;
         stream->sample_aspect_ratio.den = codec->sample_aspect_ratio.den;
+#endif
         codec->time_base.den = p_input->p_fmt->video.i_frame_rate;
         codec->time_base.num = p_input->p_fmt->video.i_frame_rate_base;
         break;