Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Parse one frame mpeg-ts video #1015

Merged
merged 11 commits into from
Oct 28, 2022
Prev Previous commit
Next Next commit
Fix h265_parser build
  • Loading branch information
joeyparrish authored Oct 28, 2022
commit 86b839730da1816dfdca5bc3ac47565ba6202e95
6 changes: 4 additions & 2 deletions packager/media/codecs/h265_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@

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

#define READ_LONG_OR_RETURN(out) READ_BITS_OR_RETURN(32, out)

Expand Down