diff mov.c @ 4625:29c799c20735 libavformat

fix missed usage of old metadata API in mov demuxer
author aurel
date Sun, 01 Mar 2009 16:06:26 +0000
parents f1a4622fc4e1
children 60d5f0997351
line wrap: on
line diff
--- a/mov.c	Sun Mar 01 15:38:06 2009 +0000
+++ b/mov.c	Sun Mar 01 16:06:26 2009 +0000
@@ -1437,10 +1437,12 @@
 
 static int mov_read_trkn(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
 {
+    char track[16];
     get_be32(pb); // type
     get_be32(pb); // unknown
-    c->fc->track = get_be32(pb);
-    dprintf(c->fc, "%.4s %d\n", (char*)&atom.type, c->fc->track);
+    snprintf(track, sizeof(track), "%d", get_be32(pb));
+    av_metadata_set(&c->fc->metadata, "track", track);
+    dprintf(c->fc, "%.4s %s\n", (char*)&atom.type, track);
     return 0;
 }