[vlc-devel] commit: Fix avformat module compilation since AVStream gets sample_aspect_ratio from 52 .21.0 and over. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Dec 6 14:45:44 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Dec  6 14:45:11 2008 +0100| [db0ec106fba56da6c7a87677e08a55e701972160] | committer: Jean-Baptiste Kempf 

Fix avformat module compilation since AVStream gets sample_aspect_ratio from 52.21.0 and over.

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

 modules/demux/avformat/mux.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index a059c49..3e98975 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -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;




More information about the vlc-devel mailing list