[FFmpeg-cvslog] avcodec/dvbsubenc: merge rectangle encode code blocks

Clément Bœsch git at videolan.org
Sat Aug 22 20:26:57 EEST 2020


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Tue Aug 18 10:29:22 2020 +0200| [5fc075d53e754c2028a2911138035d1dfedcdb65] | committer: Clément Bœsch

avcodec/dvbsubenc: merge rectangle encode code blocks

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fc075d53e754c2028a2911138035d1dfedcdb65
---

 libavcodec/dvbsubenc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/dvbsubenc.c b/libavcodec/dvbsubenc.c
index 7b8ef41a7e..ce6de4a774 100644
--- a/libavcodec/dvbsubenc.c
+++ b/libavcodec/dvbsubenc.c
@@ -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);
             buf_size -= 6 + h->rects[clut_id]->nb_colors * 6;
         }
-    }
 
     if (buf_size < h->num_rects * 22)
         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;
 
-    if (h->num_rects) {
-
         for (object_id = 0; object_id < h->num_rects; object_id++) {
             int (*dvb_encode_rle)(uint8_t **pq, int buf_size,
                                   const uint8_t *bitmap, int linesize,



More information about the ffmpeg-cvslog mailing list