Commit e4e3230e authored by Michael Niedermayer's avatar Michael Niedermayer

Only store timestamps when there are timestamps.

Originally committed as revision 13627 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 05d1d160
...@@ -134,6 +134,7 @@ int av_parser_parse(AVCodecParserContext *s, ...@@ -134,6 +134,7 @@ int av_parser_parse(AVCodecParserContext *s,
buf = dummy_buf; buf = dummy_buf;
} else { } else {
/* add a new packet descriptor */ /* 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); i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1);
s->cur_frame_start_index = i; s->cur_frame_start_index = i;
s->cur_frame_offset[i] = s->cur_offset; s->cur_frame_offset[i] = s->cur_offset;
...@@ -141,6 +142,7 @@ int av_parser_parse(AVCodecParserContext *s, ...@@ -141,6 +142,7 @@ int av_parser_parse(AVCodecParserContext *s,
s->cur_frame_pts[i] = pts; s->cur_frame_pts[i] = pts;
s->cur_frame_dts[i] = dts; s->cur_frame_dts[i] = dts;
} }
}
if (s->fetch_timestamp){ if (s->fetch_timestamp){
s->fetch_timestamp=0; s->fetch_timestamp=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment