diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-02-02 14:20:43 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-02-03 09:29:02 +0100 |
commit | d2afbd9a56e4e863bad01923006dd9b77f747035 (patch) | |
tree | 09593d24781bd903c2a3826ae45c372da1d61ab1 /libavformat/md5enc.c | |
parent | 22c0babbb2ac37724c2462d9cda01e3b7229df56 (diff) | |
download | ffmpeg-d2afbd9a56e4e863bad01923006dd9b77f747035.tar.gz |
frame{crc/md5}: set the stream timebase from codec timebase.
Right now those muxers use the default timebase in all cases(1/90000).
This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.
Also, extend the printed information to include the timebases and packet
pts/duration and align the columns.
Obviously changes the results of all fate tests which use those two
muxers.
Diffstat (limited to 'libavformat/md5enc.c')
-rw-r--r-- | libavformat/md5enc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c index 4509c18e84..3fd54506b3 100644 --- a/libavformat/md5enc.c +++ b/libavformat/md5enc.c @@ -21,6 +21,7 @@ #include "libavutil/md5.h" #include "avformat.h" +#include "internal.h" #define PRIVSIZE 512 @@ -90,7 +91,8 @@ static int framemd5_write_packet(struct AVFormatContext *s, AVPacket *pkt) av_md5_init(s->priv_data); av_md5_update(s->priv_data, pkt->data, pkt->size); - snprintf(buf, sizeof(buf) - 64, "%d, %"PRId64", %d, ", pkt->stream_index, pkt->dts, pkt->size); + snprintf(buf, sizeof(buf) - 64, "%d, %10"PRId64", %10"PRId64", %8d, %8d, ", + pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size); md5_finish(s, buf); return 0; } @@ -102,6 +104,7 @@ AVOutputFormat ff_framemd5_muxer = { .priv_data_size = PRIVSIZE, .audio_codec = CODEC_ID_PCM_S16LE, .video_codec = CODEC_ID_RAWVIDEO, + .write_header = ff_framehash_write_header, .write_packet = framemd5_write_packet, .flags = AVFMT_VARIABLE_FPS, }; |