diff options
author | Ivo van Poorten <ivop@euronet.nl> | 2008-01-07 23:38:12 +0000 |
---|---|---|
committer | Ivo van Poorten <ivop@euronet.nl> | 2008-01-07 23:38:12 +0000 |
commit | 9ae092036b88a63c525fa680b87ffc697d9baa84 (patch) | |
tree | 9a990023e338bb53577fbff594e83f3dc400625b | |
parent | 66e9e302394553fca0ebb6d25bb211cbdb4887f0 (diff) | |
download | ffmpeg-9ae092036b88a63c525fa680b87ffc697d9baa84.tar.gz |
use ff_parse_pes_pts for parsing an MPEG-PES timestamp
Originally committed as revision 11452 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/pva.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/pva.c b/libavformat/pva.c index 8874db82c8..0205675de0 100644 --- a/libavformat/pva.c +++ b/libavformat/pva.c @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "mpeg.h" #define PVA_MAX_PAYLOAD_LENGTH 0x17f8 #define PVA_VIDEO_PAYLOAD 0x01 @@ -125,11 +126,8 @@ recover: pvactx->continue_pes = pes_packet_length; - if (pes_flags & 0x80 && (pes_header_data[0] & 0xf0) == 0x20) { - pva_pts = ((long long) *pes_header_data & 0x0e) << 29; - pva_pts += (AV_RB16(pes_header_data+1) >> 1) << 15; - pva_pts += AV_RB16(pes_header_data+3) >> 1; - } + if (pes_flags & 0x80 && (pes_header_data[0] & 0xf0) == 0x20) + pva_pts = ff_parse_pes_pts(pes_header_data); } pvactx->continue_pes -= length; |