diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-08-14 16:46:32 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-08-20 13:59:17 +0100 |
commit | 768eb9182e94a94bc2ef46f565a0dac7afef3b57 (patch) | |
tree | 89eb53ffe2b381cb8b35a034739e111dd99edef9 /libavcodec | |
parent | f70f71d60c7ae88c19078a48dc6e0789b78c7300 (diff) | |
download | ffmpeg-768eb9182e94a94bc2ef46f565a0dac7afef3b57.tar.gz |
cbs_h2645: Return error if writing fails
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cbs_h2645.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 23556f47f8..4d8ba99b35 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -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 |