Revision 689abe56 libavcodec/dvbsub.c

View differences:

libavcodec/dvbsub.c
343 343
        for (object_id = 0; object_id < h->num_rects; object_id++) {
344 344
            /* Object Data segment */
345 345

  
346
            if (h->rects[region_id].nb_colors <= 4) {
346
            if (h->rects[object_id].nb_colors <= 4) {
347 347
                /* 2 bpp, some decoders do not support it correctly */
348 348
                bpp_index = 0;
349
            } else if (h->rects[region_id].nb_colors <= 16) {
349
            } else if (h->rects[object_id].nb_colors <= 16) {
350 350
                /* 4 bpp, standard encoding */
351 351
                bpp_index = 1;
352 352
            } else {

Also available in: Unified diff