diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-06-02 14:53:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-06-02 14:53:54 +0000 |
commit | e4e3230ea54ab7c66588d713b13a81fd59e10dcc (patch) | |
tree | 74b5c86ae188c3ae17430efad915b43d6563ecf5 /libavcodec | |
parent | 05d1d160bc674ab56b99307772a59cc7a8779187 (diff) | |
download | ffmpeg-e4e3230ea54ab7c66588d713b13a81fd59e10dcc.tar.gz |
Only store timestamps when there are timestamps.
Originally committed as revision 13627 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 4b2853708e..8791c7493d 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -134,12 +134,14 @@ int av_parser_parse(AVCodecParserContext *s, buf = dummy_buf; } else { /* add a new packet descriptor */ + if(pts != AV_NOPTS_VALUE || dts != AV_NOPTS_VALUE){ i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); s->cur_frame_start_index = i; s->cur_frame_offset[i] = s->cur_offset; s->cur_frame_end[i] = s->cur_offset + buf_size; s->cur_frame_pts[i] = pts; s->cur_frame_dts[i] = dts; + } } if (s->fetch_timestamp){ |