changeset 1459:571b1b1c7984 libavformat

Allow reading matroska title.
author aurel
date Tue, 07 Nov 2006 00:11:35 +0000
parents 7d13d9e4d783
children 234a04b906f9
files matroska.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Mon Nov 06 23:58:41 2006 +0000
+++ b/matroska.c	Tue Nov 07 00:11:35 2006 +0000
@@ -69,6 +69,7 @@
 /* IDs in the info master */
 #define MATROSKA_ID_TIMECODESCALE 0x2AD7B1
 #define MATROSKA_ID_DURATION   0x4489
+#define MATROSKA_ID_TITLE      0x7BA9
 #define MATROSKA_ID_WRITINGAPP 0x5741
 #define MATROSKA_ID_MUXINGAPP  0x4D80
 #define MATROSKA_ID_DATEUTC    0x4461
@@ -1096,6 +1097,16 @@
                 break;
             }
 
+            case MATROSKA_ID_TITLE: {
+                char *text;
+                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
+                    break;
+                strncpy(matroska->ctx->title, text,
+                        sizeof(matroska->ctx->title)-1);
+                av_free(text);
+                break;
+            }
+
             case MATROSKA_ID_WRITINGAPP: {
                 char *text;
                 if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)