[FFmpeg-cvslog] ffplay: use format title metadata to set window caption.

Clément Bœsch git at videolan.org
Wed Apr 17 11:11:50 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Tue Apr 16 20:07:03 2013 +0200| [9db6aaeb2c1ed9e8eaeab4bddbb71926236c5620] | committer: Clément Bœsch

ffplay: use format title metadata to set window caption.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9db6aaeb2c1ed9e8eaeab4bddbb71926236c5620
---

 ffplay.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ffplay.c b/ffplay.c
index 85e80a8..067c865 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;



More information about the ffmpeg-cvslog mailing list