• Matt Wolenetz's avatar
    MSE: Drop empty AV buffers emitted by Stream Parser · 491a2c2c
    Matt Wolenetz authored
    Since FFmpeg decode of 0-byte audio and video buffers is now disallowed,
    and FFmpegDemuxer skips enqueuing such packets into its DemuxerStream,
    this change does similar for MSE:
    
    Any 0-byte |data| audio or video buffers are dropped during initial
    processing in FrameProcessor::ProcessFrames(). No 0-byte |data| text
    buffers are dropped, because:
    * We don't use FFmpeg to decode in-band MSE text, and
    * In-band MSE text buffers' |side_data| may contain meaningful
      information. (This assumption isn't asserted by this change).
    
    Note, this change takes the simpler route of dropping 0-byte AV buffers
    before they're buffered by the coded frame processing algorithm. A more
    complex alternative to skip them when reading from SourceBufferStream
    was rejected in hopes this simpler change is sufficient.
    
    Includes ability in ChunkDemuxerTest to vary |block_size_| instead of
    always using |kBlockSize|. While the product change is closer to
    FrameProcessor, FrameProcessorTests always encode the coded frame's
    timestamp as the coded frame contents to enable precise verification of
    processing results, so the test of this change is done via
    ChunkDemuxerTest instead.
    
    BUG=823375,663438
    TEST=ChunkDemuxerTest.ZeroLengthFramesDropped
    
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: Ie6a802ba64a576f0219ca7c400fc7dec3a45fbf6
    Reviewed-on: https://chromium-review.googlesource.com/974427
    Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#546159}
    491a2c2c
test_helpers.h 13.8 KB