Ticket #8965: pgssubdec.patch

File pgssubdec.patch, 1.3 KB (added by anonymous, 9 years ago)
  • external/FFmpeg/libavcodec/pgssubdec.c

     
    4646    int x;
    4747    int y;
    4848    int id_number;
     49    int blank;
    4950} PGSSubPresentation;
    5051
    5152typedef struct PGSSubPicture {
     
    255256 * @param buf_size size of packet to process
    256257 * @todo TODO: Implement cropping
    257258 * @todo TODO: Implement forcing of subtitles
    258  * @todo TODO: Blanking of subtitle
    259259 */
    260260static void parse_presentation_segment(AVCodecContext *avctx,
    261261                                       const uint8_t *buf, int buf_size)
     
    308308        /* Fill in dimensions */
    309309        ctx->presentation.x = x;
    310310        ctx->presentation.y = y;
     311        ctx->presentation.blank = 0;
    311312    } else if (block == 0x00) {
    312         /* TODO: Blank context as subtitle should not be displayed.
    313          *       If the subtitle is blanked now the subtitle is not
    314          *       on screen long enough to read, due to a delay in
    315          *       initial display timing.
    316          */
     313        ctx->presentation.blank = 1;
    317314    }
    318315}
    319316
     
    345342     */
    346343
    347344    memset(sub, 0, sizeof(*sub));
     345    if (ctx->presentation.blank == 1) {
     346        return 1;
     347    }
    348348    sub->start_display_time = 0;
    349349    sub->end_display_time   = 20000;
    350350    sub->format             = 0;