1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffplay: set default window size before starting audio

Fixes ticket #2381.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2013-12-01 14:21:25 +01:00
parent 2b377fb4c0
commit ad01fae86d

View File

@ -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) {