diff mbox

[FFmpeg-devel,01/10] libavformat/ty: use decimal constant for shift

Message ID 20180919160532.25760-1-michael@niedermayer.cc
State Accepted
Commit 8c49340b189fe6e2f563a00c708eec97101ae337
Headers show

Commit Message

Michael Niedermayer Sept. 19, 2018, 4:05 p.m. UTC
This was the only case in the source that uses a hexadecimal shift value.
The change removed a special case in respect to greping

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/ty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Oct. 6, 2018, 8:10 p.m. UTC | #1
On Wed, Sep 19, 2018 at 06:05:23PM +0200, Michael Niedermayer wrote:
> This was the only case in the source that uses a hexadecimal shift value.
> The change removed a special case in respect to greping
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/ty.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply the rest of the patchset which hasnt been applied yet

[...]
diff mbox

Patch

diff --git a/libavformat/ty.c b/libavformat/ty.c
index d348643f40..8230d3a2bb 100644
--- a/libavformat/ty.c
+++ b/libavformat/ty.c
@@ -254,7 +254,7 @@  static int analyze_chunk(AVFormatContext *s, const uint8_t *chunk)
             if (data_offset + hdrs[i].rec_size > CHUNK_SIZE)
                 break;
 
-            if ((hdrs[i].subrec_type << 0x08 | hdrs[i].rec_type) == 0x3c0 && hdrs[i].rec_size > 15) {
+            if ((hdrs[i].subrec_type << 8 | hdrs[i].rec_type) == 0x3c0 && hdrs[i].rec_size > 15) {
                 /* first make sure we're aligned */
                 int pes_offset = find_es_header(ty_MPEGAudioPacket,
                         &chunk[data_offset], 5);