Skip to content

Commit

Permalink
Fix h264 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish authored Oct 28, 2022
1 parent 1bbcdb6 commit e2dd0a6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packager/media/codecs/h264_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ bool H264SliceHeader::IsSISlice() const {
} \
} while (0)

#define READ_LONG_OR_RETURN(out) \
do { \
int _out; \
if (!br->ReadBits(32, &_out)) { \
DVLOG(1) \
<< "Error in stream: unexpected EOS while trying to read " #out; \
return kInvalidStream; \
} \
*(out) = _out != 0; \
} while (0)
#define READ_LONG_OR_RETURN(out) \
do { \
long _out; \
int _tmp_out; \
READ_BITS_OR_RETURN(16, &_tmp_out); \
_out = (long)(_tmp_out) << 16; \
READ_BITS_OR_RETURN(16, &_tmp_out); \
_out |= _tmp_out; \
*(out) = _out; \
} while(0)

#define READ_BOOL_OR_RETURN(out) \
do { \
Expand Down

0 comments on commit e2dd0a6

Please sign in to comment.