static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,

                            AVPacket *avpkt)

{

    const char *ptr = avpkt->data;

    int len, size = avpkt->size;



    while (size > 0) {

        ASSDialog *dialog = ff_ass_split_dialog(avctx->priv_data, ptr, 0, NULL);

        int duration = dialog->end - dialog->start;

        len = ff_ass_add_rect(data, ptr, 0, duration, 1);

        if (len < 0)

            return len;

        ptr  += len;

        size -= len;

    }



    *got_sub_ptr = avpkt->size > 0;

    return avpkt->size;

}

static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,

                            AVPacket *avpkt)

{

    const char *ptr = avpkt->data;

    int len, size = avpkt->size;



    while (size > 0) {

        ASSDialog *dialog = ff_ass_split_dialog(avctx->priv_data, ptr, 0, NULL);

        int duration = dialog->end - dialog->start;

        len = ff_ass_add_rect(data, ptr, 0, duration, 1);

        if (len < 0)

            return len;

        ptr  += len;

        size -= len;

    }



    *got_sub_ptr = avpkt->size > 0;

    return avpkt->size;

}

        int duration = dialog->end - dialog->start;
static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,

                            AVPacket *VAR_3)

{

    const char *VAR_4 = VAR_3->VAR_1;

    int VAR_5, VAR_6 = VAR_3->VAR_6;



    while (VAR_6 > 0) {

        ASSDialog *dialog = ff_ass_split_dialog(VAR_0->priv_data, VAR_4, 0, NULL);

        int VAR_7 = dialog->end - dialog->start;

        VAR_5 = ff_ass_add_rect(VAR_1, VAR_4, 0, VAR_7, 1);

        if (VAR_5 < 0)

            return VAR_5;

        VAR_4  += VAR_5;

        VAR_6 -= VAR_5;

    }



    *VAR_2 = VAR_3->VAR_6 > 0;

    return VAR_3->VAR_6;

}

static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{ const char *VAR_4 = VAR_3->VAR_1; int VAR_5, VAR_6 = VAR_3->VAR_6; while (VAR_6 > 0) { ASSDialog *dialog = ff_ass_split_dialog(VAR_0->priv_data, VAR_4, 0, NULL); int VAR_7 = dialog->end - dialog->start; VAR_5 = ff_ass_add_rect(VAR_1, VAR_4, 0, VAR_7, 1); if (VAR_5 < 0)
return VAR_5; VAR_4  += VAR_5; VAR_6 -= VAR_5; } *VAR_2 = VAR_3->VAR_6 > 0; return VAR_3->VAR_6; }