[FFmpeg-devel] [PATCH 2/5] ffplay: fix compilation with Visual Studio
Marton Balint
cus at passwd.hu
Sun May 11 22:51:07 CEST 2014
On Sat, 10 May 2014, Reimar Döffinger wrote:
> 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};
Good point. I will change it (even if it should not matter at the moment).
Thanks,
Marton
More information about the ffmpeg-devel
mailing list