[FFmpeg-devel] [PATCH 2/5] wtvdec: ignore WM/MediaThumbType metadata entry

Peter Ross pross at xvid.org
Sun Dec 30 13:34:36 CET 2012


This tag is used by Windows Media Centre in displaying the thumbnail,
and should NOT be copied into the FFmpeg metadata dictionary.
---
 libavformat/wtvdec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 5e9c817..88daa09 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -450,7 +450,10 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int ty
     if (!buf)
         return;
 
-    if (type == 0 && length == 4) {
+    if (!strcmp(key, "WM/MediaThumbType")) {
+        avio_skip(pb, length);
+        return;
+    } else if (type == 0 && length == 4) {
         snprintf(buf, buf_size, "%"PRIi32, avio_rl32(pb));
     } else if (type == 1) {
         avio_get_str16le(pb, length, buf, buf_size);
-- 
1.8.0

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121230/a820be75/attachment.asc>


More information about the ffmpeg-devel mailing list