webrtc/sdk/objc/Framework/Classes/VideoToolbox
Guy Hershenbaum 2fcb834bb4 Search for SPS NALU rather than assuming its position
Summary:
The implementation of H264AnnexBBufferHasVideoFormatDescription was
assuming that the SPS NALU is either the first NALU in the stream, or
the second one, in case an AUD NALU is present in the first location.
This change removes this assumption and instead searches for the SPS
NALU, failing only if we can't find one.

In addition, it cleans up some binary buffer manipulation code, using the
the parsed NALU indices we already have in AnnexBBufferReader instead.

Test Plan: Unit tests

Change-Id: Id9715aa1d751f0ba1a1992def2b690607896df56

bug: webrtc:8922
Change-Id: Id9715aa1d751f0ba1a1992def2b690607896df56
Reviewed-on: https://webrtc-review.googlesource.com/49982
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22205}
2018-02-27 14:39:59 +00:00
..
helpers.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
helpers.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
nalu_rewriter.cc Search for SPS NALU rather than assuming its position 2018-02-27 14:39:59 +00:00
nalu_rewriter.h Search for SPS NALU rather than assuming its position 2018-02-27 14:39:59 +00:00
nalu_rewriter_unittest.cc Search for SPS NALU rather than assuming its position 2018-02-27 14:39:59 +00:00
RTCVideoDecoderH264.mm Search for SPS NALU rather than assuming its position 2018-02-27 14:39:59 +00:00
RTCVideoEncoderH264.mm Fixing some of the issues found by clang static analyzer. 2018-01-12 16:35:09 +00:00