static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)

{

    AVSubtitle subtitle;

    int i, ret = avcodec_decode_subtitle2(ist->dec_ctx,

                                          &subtitle, got_output, pkt);

    if (ret < 0)

        return ret;

    if (!*got_output)

        return ret;



    ist->frames_decoded++;



    for (i = 0; i < nb_output_streams; i++) {

        OutputStream *ost = output_streams[i];



        if (!check_output_constraints(ist, ost) || !ost->encoding_needed)

            continue;



        do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle, pkt->pts);

    }



    avsubtitle_free(&subtitle);

    return ret;

}

static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)

{

    AVSubtitle subtitle;

    int i, ret = avcodec_decode_subtitle2(ist->dec_ctx,

                                          &subtitle, got_output, pkt);

    if (ret < 0)

        return ret;

    if (!*got_output)

        return ret;



    ist->frames_decoded++;



    for (i = 0; i < nb_output_streams; i++) {

        OutputStream *ost = output_streams[i];



        if (!check_output_constraints(ist, ost) || !ost->encoding_needed)

            continue;



        do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle, pkt->pts);

    }



    avsubtitle_free(&subtitle);

    return ret;

}

static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2)

{

    AVSubtitle subtitle;

    int VAR_3, VAR_4 = avcodec_decode_subtitle2(VAR_0->dec_ctx,

                                          &subtitle, VAR_2, VAR_1);

    if (VAR_4 < 0)

        return VAR_4;

    if (!*VAR_2)

        return VAR_4;



    VAR_0->frames_decoded++;



    for (VAR_3 = 0; VAR_3 < nb_output_streams; VAR_3++) {

        OutputStream *ost = output_streams[VAR_3];



        if (!check_output_constraints(VAR_0, ost) || !ost->encoding_needed)

            continue;



        do_subtitle_out(output_files[ost->file_index]->ctx, ost, VAR_0, &subtitle, VAR_1->pts);

    }



    avsubtitle_free(&subtitle);

    return VAR_4;

}

static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2)
{ AVSubtitle subtitle; int VAR_3, VAR_4 = avcodec_decode_subtitle2(VAR_0->dec_ctx,
&subtitle, VAR_2, VAR_1); if (VAR_4 < 0)
return VAR_4; if (!*VAR_2)
return VAR_4; VAR_0->frames_decoded++; for (VAR_3 = 0; VAR_3 < nb_output_streams; VAR_3++) { OutputStream *ost = output_streams[VAR_3]; if (!check_output_constraints(VAR_0, ost) || !ost->encoding_needed)
continue; do_subtitle_out(output_files[ost->file_index]->ctx, ost, VAR_0, &subtitle, VAR_1->pts); } avsubtitle_free(&subtitle); return VAR_4; }