Mercurial > libavformat.hg
comparison mpeg.h @ 2906:e5dfe3c96f3b libavformat
Move parsing of MPEG-PES timestamp to mpeg.h (as an inline function) so it
can easily be reused by other demuxers for formats that encapsulate MPEG-PES.
author | ivo |
---|---|
date | Mon, 07 Jan 2008 23:32:57 +0000 |
parents | 792383dd085e |
children | feeee985c74c |
comparison
equal
deleted
inserted
replaced
2905:616fb87724b5 | 2906:e5dfe3c96f3b |
---|---|
55 #define STREAM_TYPE_AUDIO_AC3 0x81 | 55 #define STREAM_TYPE_AUDIO_AC3 0x81 |
56 #define STREAM_TYPE_AUDIO_DTS 0x8a | 56 #define STREAM_TYPE_AUDIO_DTS 0x8a |
57 | 57 |
58 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; | 58 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; |
59 | 59 |
60 /** | |
61 * Parse MPEG-PES five-byte timestamp | |
62 */ | |
63 static inline int64_t ff_parse_pes_pts(uint8_t *buf) { | |
64 return (int64_t)(*buf & 0x0e) << 29 | | |
65 (AV_RB16(buf+1) >> 1) << 15 | | |
66 AV_RB16(buf+3) >> 1; | |
67 } | |
68 | |
60 #endif /* FFMPEG_MPEG_H */ | 69 #endif /* FFMPEG_MPEG_H */ |