diff options
author | James Almer <jamrial@gmail.com> | 2016-04-13 21:13:21 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-04-13 21:13:21 -0300 |
commit | 0efafc5849037046c3834769d6e20d33fae0c769 (patch) | |
tree | 7c3d83c5b3dbb734835a9f7c116f5cf4c044dad7 /libavformat/hashenc.c | |
parent | 868bce48f6d85c29d1b8c17686b42ea5601865ce (diff) | |
download | ffmpeg-0efafc5849037046c3834769d6e20d33fae0c769.tar.gz |
avformat/framehash: enable new output
Also, make every addition except for sidedata part of version 1 instead of the
new version 2.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/hashenc.c')
-rw-r--r-- | libavformat/hashenc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c index 86f93813fe..ced2f66e65 100644 --- a/libavformat/hashenc.c +++ b/libavformat/hashenc.c @@ -58,7 +58,7 @@ static void hash_finish(struct AVFormatContext *s, char *buf) #if CONFIG_HASH_MUXER || CONFIG_FRAMEHASH_MUXER static const AVOption hash_options[] = { { "hash", "set hash to use", OFFSET(hash_name), AV_OPT_TYPE_STRING, {.str = "sha256"}, 0, 0, ENC }, - { "format_version", "file format version", OFFSET(format_version), AV_OPT_TYPE_INT, {.i64 = 1}, 1, 2, ENC }, + { "format_version", "file format version", OFFSET(format_version), AV_OPT_TYPE_INT, {.i64 = 2}, 1, 2, ENC }, { NULL }, }; #endif @@ -66,7 +66,7 @@ static const AVOption hash_options[] = { #if CONFIG_MD5_MUXER || CONFIG_FRAMEMD5_MUXER static const AVOption md5_options[] = { { "hash", "set hash to use", OFFSET(hash_name), AV_OPT_TYPE_STRING, {.str = "md5"}, 0, 0, ENC }, - { "format_version", "file format version", OFFSET(format_version), AV_OPT_TYPE_INT, {.i64 = 1}, 1, 2, ENC }, + { "format_version", "file format version", OFFSET(format_version), AV_OPT_TYPE_INT, {.i64 = 2}, 1, 2, ENC }, { NULL }, }; #endif @@ -180,9 +180,8 @@ static int framehash_write_header(struct AVFormatContext *s) avio_printf(s->pb, "#format: frame checksums\n"); avio_printf(s->pb, "#version: %d\n", c->format_version); avio_printf(s->pb, "#hash: %s\n", av_hash_get_name(c->hash)); - if (c->format_version > 1) - framehash_print_extradata(s); - ff_framehash_write_header(s, c->format_version); + framehash_print_extradata(s); + ff_framehash_write_header(s); avio_printf(s->pb, "#stream#, dts, pts, duration, size, hash\n"); return 0; } |