mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
cbs_h2645: Return error if writing fails
This commit is contained in:
parent
f70f71d60c
commit
768eb9182e
@ -1244,6 +1244,11 @@ static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx,
|
||||
// Overflow but we didn't notice.
|
||||
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)
|
||||
unit->data_bit_padding = 8 - put_bits_count(&pbc) % 8;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user