avcodec/mpeg12enc: Fix writing closed captions
Broken in 6e225123d8, because
ff_copy_bits() expects the amount of bits, not bytes to write.
And because it relies on the buffer to be padded, using
side_data->size * 8 is not possible. So partially revert
said commit.
Fixes ticket #11591.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
79e2a845cd
commit
45daaf2caa
1 changed files with 2 additions and 1 deletions
|
|
@ -472,7 +472,8 @@ static int mpeg1_encode_picture_header(MPVMainEncContext *const m)
|
|||
(side_data->size / 3 & A53_MAX_CC_COUNT) | 0x40); // flags, cc_count
|
||||
put_bits(&s->pb, 8, 0xff); // em_data
|
||||
|
||||
ff_copy_bits(&s->pb, side_data->data, side_data->size);
|
||||
for (int i = 0; i < side_data->size; i++)
|
||||
put_bits(&s->pb, 8, side_data->data[i]);
|
||||
|
||||
put_bits(&s->pb, 8, 0xff); // marker_bits
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue