[FFmpeg-devel] [PATCH 2/2] avformat/md5enc: add format, version and column headers

Michael Niedermayer michaelni at gmx.at
Sun Oct 20 23:02:40 CEST 2013


See Ticket2280

@@ -1,4 +1,7 @@
+#format: framemd5
+#version: 1
 #tb 0: 1/25
+#stream#, dts,        pts, duration,     size, MD5
 0,          0,          0,        1,   195264, 5869dee2126d98ecc1fab1e69720906a
 0,          1,          1,        1,   195272, 1bd08dcde1061b0d9273bdc6dd901382
 0,          2,          2,        1,   195892, 2b3fc3632bcd1cc44f777fb97a56f79b

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/md5enc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 270d9fb..5df257b 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -117,7 +117,11 @@ static int framemd5_write_header(struct AVFormatContext *s)
     int res = av_hash_alloc(&c->hash, c->hash_name);
     if (res < 0)
         return res;
-    return ff_framehash_write_header(s);
+    avio_printf(s->pb, "#format: framemd5\n");
+    avio_printf(s->pb, "#version: 1\n");
+    ff_framehash_write_header(s);
+    avio_printf(s->pb, "#stream#, dts,        pts, duration,     size, MD5\n");
+    return 0;
 }
 
 static int framemd5_write_packet(struct AVFormatContext *s, AVPacket *pkt)
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list