Commit 16c24254 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Fix DCHECK in FuchsiaVideoDecoder

FuchsiaVideoDecoder::ReleaseInputBuffers() was clearing
in_flight_input_packets_ before destroying input packets, which was
resulting in DCHECK failure. This change updates ReleaseInputBuffers()
to destroy input buffers before dropping the packets.

Bug: 1013919
Change-Id: I7288c1c47ab400877e5e4ec629083963b8e90a26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857712
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705595}
parent 2aa76fb2
...@@ -1032,11 +1032,15 @@ void FuchsiaVideoDecoder::InitializeOutputBufferCollection( ...@@ -1032,11 +1032,15 @@ void FuchsiaVideoDecoder::InitializeOutputBufferCollection(
} }
void FuchsiaVideoDecoder::ReleaseInputBuffers() { void FuchsiaVideoDecoder::ReleaseInputBuffers() {
in_flight_input_packets_.clear();
input_writer_queue_.ResetBuffers(); input_writer_queue_.ResetBuffers();
input_buffer_collection_creator_.reset(); input_buffer_collection_creator_.reset();
input_buffer_collection_.reset(); input_buffer_collection_.reset();
num_input_buffers_ = 0; num_input_buffers_ = 0;
// |in_flight_input_packets_| must be destroyed after
// |input_writer_queue_.ResetBuffers()|. Otherwise |input_writer_queue_| may
// call SendInputPacket() in response to the packet destruction callbacks.
in_flight_input_packets_.clear();
} }
void FuchsiaVideoDecoder::ReleaseOutputBuffers() { void FuchsiaVideoDecoder::ReleaseOutputBuffers() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment