You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/dvbsubenc: merge rectangle encode code blocks
This commit is contained in:
@@ -374,7 +374,6 @@ static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size,
|
|||||||
bytestream_put_be16(&pseg_len, q - pseg_len - 2);
|
bytestream_put_be16(&pseg_len, q - pseg_len - 2);
|
||||||
buf_size -= 6 + h->rects[clut_id]->nb_colors * 6;
|
buf_size -= 6 + h->rects[clut_id]->nb_colors * 6;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (buf_size < h->num_rects * 22)
|
if (buf_size < h->num_rects * 22)
|
||||||
return AVERROR_BUFFER_TOO_SMALL;
|
return AVERROR_BUFFER_TOO_SMALL;
|
||||||
@@ -419,8 +418,6 @@ static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size,
|
|||||||
}
|
}
|
||||||
buf_size -= h->num_rects * 22;
|
buf_size -= h->num_rects * 22;
|
||||||
|
|
||||||
if (h->num_rects) {
|
|
||||||
|
|
||||||
for (object_id = 0; object_id < h->num_rects; object_id++) {
|
for (object_id = 0; object_id < h->num_rects; object_id++) {
|
||||||
int (*dvb_encode_rle)(uint8_t **pq, int buf_size,
|
int (*dvb_encode_rle)(uint8_t **pq, int buf_size,
|
||||||
const uint8_t *bitmap, int linesize,
|
const uint8_t *bitmap, int linesize,
|
||||||
|
Reference in New Issue
Block a user