diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-15 00:06:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-16 04:31:30 +0200 |
commit | b50a4ca179cf6e5d45b4ff68aff3003ebc47b2b4 (patch) | |
tree | 3f42ca1d92ac9532f1a96afd2e5afe5d726ea5c2 /libavformat/utils.c | |
parent | c658269cd18cd9861c805ca283857e17d2222d8d (diff) | |
download | ffmpeg-b50a4ca179cf6e5d45b4ff68aff3003ebc47b2b4.tar.gz |
avformat/utils: Preserve packet duration when parsing is done only for headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index a7440f547e..6c7ca0acc1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1223,7 +1223,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index) } /* set the duration */ - out_pkt.duration = 0; + out_pkt.duration = (st->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) ? pkt->duration : 0; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { if (st->codec->sample_rate > 0) { out_pkt.duration = |