diff options
author | Marton Balint <cus@passwd.hu> | 2013-12-01 14:21:25 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2013-12-06 19:57:45 +0100 |
commit | ad01fae86d80c8a7ac87f6203d87418b898e62ab (patch) | |
tree | a0edcf4d76f4dced8c517265be5cdc5d8e14befb /ffplay.c | |
parent | 2b377fb4c0539dc50b417be98e9ca78c85697520 (diff) | |
download | ffmpeg-ad01fae86d80c8a7ac87f6203d87418b898e62ab.tar.gz |
ffplay: set default window size before starting audio
Fixes ticket #2381.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) { |