[FFmpeg-devel] [PATCH] Map description metadata to ©inf tag in .mov wrapper

Brian Wheeler bdwheele at indiana.edu
Thu Nov 19 17:20:04 CET 2015


The description metadata isn't mapped to anything when the mov wrapper 
is used.    This patch maps description to ©inf for both reading and 
writing.
The change to mov.c makes the mapping round-trip.

Signed-off-by: Brian Wheeler <bdwheele at indiana.edu>
---
  libavformat/mov.c    | 2 +-
  libavformat/movenc.c | 1 +
  2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0eb7272..960667f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -342,7 +342,7 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
      case MKTAG(0xa9,'g','e','n'): key = "genre";     break;
      case MKTAG(0xa9,'g','r','p'): key = "grouping";  break;
      case MKTAG(0xa9,'h','s','t'): key = "host_computer"; break;
-    case MKTAG(0xa9,'i','n','f'): key = "comment";   break;
+    case MKTAG(0xa9,'i','n','f'): key = "description"; break;
      case MKTAG(0xa9,'l','y','r'): key = "lyrics";    break;
      case MKTAG(0xa9,'m','a','k'): key = "make";      break;
      case MKTAG(0xa9,'m','o','d'): key = "model";     break;
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 53e3772..ad29cb6 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3073,6 +3073,7 @@ static int mov_write_udta_tag(AVIOContext *pb, 
MOVMuxContext *mov,
          mov_write_string_metadata(s, pb_buf, "\251aut", "author",      0);
          mov_write_string_metadata(s, pb_buf, "\251alb", "album",       0);
          mov_write_string_metadata(s, pb_buf, "\251day", "date",        0);
+        mov_write_string_metadata(s, pb_buf, "\251inf", "description", 0);
          mov_write_string_metadata(s, pb_buf, "\251swr", "encoder",     0);
          // currently ignored by mov.c
          mov_write_string_metadata(s, pb_buf, "\251des", "comment",     0);
-- 
2.4.3



More information about the ffmpeg-devel mailing list