diff options
author | Andy Parkins <andrew.parkins@360visiontechnology.com> | 2006-12-06 15:46:12 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-12-06 15:46:12 +0000 |
commit | 8533284daeccd769670be4e58a36313a23afdaa4 (patch) | |
tree | 3160c413e3340d27b6d141400f6f130c20f9ac80 | |
parent | 119aae1dd5674c654da38c58903f6bfe08ce3ecb (diff) | |
download | ffmpeg-8533284daeccd769670be4e58a36313a23afdaa4.tar.gz |
do not truncate pts/dts if value is AV_NOPTS_VALUE, patch by Andy Parkins, andrew parkins at 360visiontechnology com
Originally committed as revision 7234 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index eaeeb7c165..d838bc86c1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2288,8 +2288,12 @@ static void truncate_ts(AVStream *st, AVPacket *pkt){ // if(pkt->dts < 0) // pkt->dts= 0; //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here - pkt->pts &= pts_mask; - pkt->dts &= pts_mask; + if( pkt->pts != AV_NOPTS_VALUE ) { + pkt->pts &= pts_mask; + } + if( pkt->dts != AV_NOPTS_VALUE ) { + pkt->dts &= pts_mask; + } } /** |