Allow reading matroska title.
authorAurelien Jacobs <aurel@gnuage.org>
Tue, 7 Nov 2006 00:11:35 +0000 (00:11 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Tue, 7 Nov 2006 00:11:35 +0000 (00:11 +0000)
Originally committed as revision 6927 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroska.c

index e3ec2613c8af3ed6bfd722b8cb8c64ea8cd18aa2..eb13903f8da4ee8962b3cd4e86a7ac65ac8776cf 100644 (file)
@@ -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 @@ matroska_parse_info (MatroskaDemuxContext *matroska)
                 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)