[FFmpeg-devel] [PATCH 2/5] ffplay: fix compilation with Visual Studio
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat May 10 18:45:02 CEST 2014
On 10.05.2014, at 16:04, Marton Balint <cus at passwd.hu> wrote:
> A patch by achristensen from trac.ffmpeg.org.
>
> Fixes ticket #3580.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> ffplay.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index 588aff58..1fe7107 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -2824,7 +2824,10 @@ static int read_thread(void *arg)
> if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
> AVStream *st = ic->streams[st_index[AVMEDIA_TYPE_VIDEO]];
> AVCodecContext *avctx = st->codec;
> - VideoPicture vp = {.width = avctx->width, .height = avctx->height, .sar = av_guess_sample_aspect_ratio(ic, st, NULL)};
> + VideoPicture vp;
> + vp.width = avctx->width;
> + vp.height = avctx->height;
> + vp.sar = av_guess_sample_aspect_ratio(ic, st, NULL);
This will cause all fields that are not initialized explicitly (e.g. any added in the future) to remain uninitialized.
I think this should at least remain
VideoPicture vp = {0};
More information about the ffmpeg-devel
mailing list