Files
ffmpeg/libavcodec
Andreas Rheinhardt 1cf238d3bf avcodec/cbs: Factor out common code for writing units
All cbs-functions to write units share a common pattern:
1. They check whether they have a write buffer (that is used to store
the unit's data until the needed size becomes known after writing the
unit when a dedicated buffer will be allocated).
2. They use this buffer for a PutBitContext.
3. The (codec-specific) writing takes place through the PutBitContext.
4. The return value is checked. AVERROR(ENOSPC) here always indicates
that the buffer was too small and leads to a reallocation of said
buffer.
5. The final buffer will be allocated and the data copied.

This commit factors this common code out in a single function in cbs.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 7c92eaace2)
2019-12-31 16:57:37 -03:00
..
2014-06-15 12:11:46 +02:00
2019-12-31 19:51:57 +01:00
2019-06-12 20:06:20 +10:00
2018-10-15 01:19:45 +02:00
2019-06-26 21:25:10 +02:00
2017-07-07 15:23:58 -04:00
2016-06-06 14:32:48 +02:00
2018-07-18 13:59:25 +02:00
2019-06-12 20:06:20 +10:00
2019-09-04 20:26:35 +02:00
2017-06-11 10:00:16 +02:00
2019-04-21 19:43:14 +02:00
2019-05-06 23:58:34 +02:00
2019-12-31 19:51:57 +01:00
2018-12-23 15:30:13 +01:00
2012-05-18 23:34:11 +02:00
2016-03-07 11:17:31 +01:00
2016-07-27 10:19:40 +03:00
2019-06-29 19:22:19 +02:00
2019-07-01 13:24:57 +08:00
2016-09-17 13:23:56 +01:00
2017-02-03 20:16:30 +01:00
2019-09-04 20:26:35 +02:00
2019-12-31 19:51:56 +01:00
2019-09-02 13:53:08 -07:00
2019-03-31 23:35:00 +02:00
2019-12-31 19:51:56 +01:00
2019-05-07 11:00:19 +08:00
2017-07-26 06:13:05 +07:00
2019-09-04 20:26:35 +02:00
2010-06-25 08:19:20 +00:00
2019-12-31 19:51:57 +01:00
2019-07-08 09:38:03 +02:00
2014-07-12 22:33:27 +02:00
2016-08-06 18:27:01 -03:00
2019-12-31 19:51:56 +01:00
2019-12-31 19:51:56 +01:00
2017-10-04 23:14:37 +01:00
2017-11-26 21:41:19 +00:00
2019-12-31 19:51:57 +01:00
2017-02-02 01:12:07 +01:00
2019-06-12 20:06:20 +10:00
2019-12-31 19:51:56 +01:00
2019-09-04 20:26:35 +02:00
2019-09-04 20:26:35 +02:00
2019-08-05 19:34:33 +02:00
2019-05-02 15:36:16 +02:00
2019-05-02 15:36:16 +02:00