Skip to content

Commit

Permalink
H264Parser: don't send frames with 0 NALU
Browse files Browse the repository at this point in the history
  • Loading branch information
soyersoyer committed Mar 19, 2022
1 parent 65bc98f commit 414ed1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions h264.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def write_buf(self, buf):
if not self.sps or not self.pps:
logging.error('H264Parser: Invalid H264 first frame. Unable to read SPS and PPS.')

if len(nalus) == 0:
logging.warning('H264Parser: 0 NALU found')
return

with self.condition:
self.nalus = nalus
self.frame_secs = buf.timestamp.secs
Expand Down

0 comments on commit 414ed1c

Please sign in to comment.