mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-30 16:37:44 +00:00
Only store timestamps when there are timestamps.
Originally committed as revision 13627 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
05d1d160bc
commit
e4e3230ea5
1 changed files with 2 additions and 0 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue