[FFmpeg-cvslog] mpegtsenc: set reserved bits to 1 in PCR field

Georgi Chorbadzhiyski git
Fri Jan 28 03:43:31 CET 2011


ffmpeg | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Tue Jan 25 11:20:03 2011 +0000| [4c9bfe3e4e28cad1e686dda68ba46094df26f1e3] | committer: Michael Niedermayer

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 at mansr.com>
(cherry picked from commit 535638b55f83ad47e4680883e87b97e69d0847e5)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c9bfe3e4e28cad1e686dda68ba46094df26f1e3
---

 libavformat/mpegtsenc.c |    2 +-
 tests/ref/lavf/ts       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f621646..147faae 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;
diff --git a/tests/ref/lavf/ts b/tests/ref/lavf/ts
index 5b046fb..e054141 100644
--- a/tests/ref/lavf/ts
+++ b/tests/ref/lavf/ts
@@ -1,3 +1,3 @@
-e0c183639709d6e75bc553a3ed1333dd *./tests/data/lavf/lavf.ts
+90e770ba5ec0506bd66cd44511e173a3 *./tests/data/lavf/lavf.ts
 406644 ./tests/data/lavf/lavf.ts
 ./tests/data/lavf/lavf.ts CRC=0x133216c1




More information about the ffmpeg-cvslog mailing list