aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-16 20:07:03 +0200
committerClément Bœsch <ubitux@gmail.com>2013-04-17 11:08:49 +0200
commit9db6aaeb2c1ed9e8eaeab4bddbb71926236c5620 (patch)
tree7d52c51db462e94929b20dedad4cbd0669bf78b5 /ffplay.c
parentb8edf91657ad9fa2f0c5175c9ca8fbe3c8b0c624 (diff)
downloadffmpeg-9db6aaeb2c1ed9e8eaeab4bddbb71926236c5620.tar.gz
ffplay: use format title metadata to set window caption.
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 85e80a84e1..067c86520b 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2725,6 +2725,9 @@ static int read_thread(void *arg)
is->max_frame_duration = (ic->iformat->flags & AVFMT_TS_DISCONT) ? 10.0 : 3600.0;
+ if (!window_title && (t = av_dict_get(ic->metadata, "title", NULL, 0)))
+ window_title = av_asprintf("%s - %s", t->value, input_filename);
+
/* if seeking requested, we execute it */
if (start_time != AV_NOPTS_VALUE) {
int64_t timestamp;