aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorGeorgi Chorbadzhiyski <gf@unixsol.org>2011-01-25 11:20:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-28 03:15:32 +0100
commit4c9bfe3e4e28cad1e686dda68ba46094df26f1e3 (patch)
tree77ababcf7f1adae1cb7177c96efc5aaed22d1b7d /libavformat
parentbe61983d52c29e919acd25d1788fef9a91784a8b (diff)
downloadffmpeg-4c9bfe3e4e28cad1e686dda68ba46094df26f1e3.tar.gz
mpegtsenc: set reserved bits to 1 in PCR field
The reserved bits between PCR base and extension fields must be set to 1. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 535638b55f83ad47e4680883e87b97e69d0847e5)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegtsenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f621646c52..147faaed0d 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -573,7 +573,7 @@ static uint8_t* write_pcr_bits(uint8_t *buf, int64_t pcr)
*buf++ = pcr_high >> 17;
*buf++ = pcr_high >> 9;
*buf++ = pcr_high >> 1;
- *buf++ = ((pcr_high & 1) << 7) | (pcr_low >> 8);
+ *buf++ = pcr_high << 7 | pcr_low >> 8 | 0x7e;
*buf++ = pcr_low;
return buf;