diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-07 00:11:35 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-07 00:11:35 +0000 |
commit | 0ab07420a2f6187a27fa03b9ad20f9b464b54ef2 (patch) | |
tree | 9cd01cacbc9e5c20e6507d1a9048c432a9d5c336 /libavformat | |
parent | 5b99b90d380f2739fa5d0f8421b1d1a91cf7f96c (diff) | |
download | ffmpeg-0ab07420a2f6187a27fa03b9ad20f9b464b54ef2.tar.gz |
Allow reading matroska title.
Originally committed as revision 6927 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroska.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c index e3ec2613c8..eb13903f8d 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -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) |