Commit 768eb918 authored by Mark Thompson's avatar Mark Thompson

cbs_h2645: Return error if writing fails

parent f70f71d6
...@@ -1244,6 +1244,11 @@ static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx, ...@@ -1244,6 +1244,11 @@ static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx,
// Overflow but we didn't notice. // Overflow but we didn't notice.
av_assert0(put_bits_count(&pbc) <= 8 * priv->write_buffer_size); av_assert0(put_bits_count(&pbc) <= 8 * priv->write_buffer_size);
if (err < 0) {
// Write failed for some other reason.
return err;
}
if (put_bits_count(&pbc) % 8) if (put_bits_count(&pbc) % 8)
unit->data_bit_padding = 8 - put_bits_count(&pbc) % 8; unit->data_bit_padding = 8 - put_bits_count(&pbc) % 8;
else else
......
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