Commit db0ec106 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

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

parent e7d3f3d5
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment