Skip to content

Commit

Permalink
Merge pull request #170 from fador/scl_bugfix
Browse files Browse the repository at this point in the history
formats: fix a bug in SCL, sequence like \0\0\0\1\0 not detected
  • Loading branch information
jrsnen authored Oct 25, 2022
2 parents 45d48d2 + 20df228 commit 914b211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formats/h26x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ ssize_t uvgrtp::formats::h26x::find_h26x_start_code(
{
/* Previous dword had zeros but this doesn't. The only way there might be a start code
* is if the most significant byte of current dword is 0x01 */
if (prev_had_zero && !cur_has_zero) {
if (prev_had_zero) {
/* previous dword: 0xXX000000 or 0xXXXX0000 and current dword 0x01XXXXXX */
#if __BYTE_ORDER == __LITTLE_ENDIAN
if (((cur_value32 >> 0) & 0xff) == 0x01 && ((prev_value32 >> 16) & 0xffff) == 0) {
Expand Down

0 comments on commit 914b211

Please sign in to comment.