Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-12-01 17:21:25 +0400
committerMarton Balint <cus@passwd.hu>2013-12-06 22:57:45 +0400
commitad01fae86d80c8a7ac87f6203d87418b898e62ab (patch)
treea0edcf4d76f4dced8c517265be5cdc5d8e14befb /ffplay.c
parent2b377fb4c0539dc50b417be98e9ca78c85697520 (diff)
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 30ee5fdf43..4893ebcb2f 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -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) {