Commit ad01fae8 authored by Marton Balint's avatar Marton Balint

ffplay: set default window size before starting audio

Fixes ticket #2381.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 2b377fb4
......@@ -2818,6 +2818,13 @@ static int read_thread(void *arg)
}
is->show_mode = show_mode;
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)};
if (vp.width)
set_default_window_size(&vp);
}
/* open the streams */
if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) {
......
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