static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)

{

    TAKDemuxContext *tc = s->priv_data;

    int ret;



    if (tc->mlast_frame) {

        AVIOContext *pb = s->pb;

        int64_t size, left;



        left = tc->data_end - avio_tell(s->pb);

        size = FFMIN(left, 1024);

        if (size <= 0)

            return AVERROR_EOF;



        ret = av_get_packet(pb, pkt, size);

        if (ret < 0)

            return ret;



        pkt->stream_index = 0;

    } else {

        ret = ff_raw_read_partial_packet(s, pkt);

    }



    return ret;

}

static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)

{

    TAKDemuxContext *tc = s->priv_data;

    int ret;



    if (tc->mlast_frame) {

        AVIOContext *pb = s->pb;

        int64_t size, left;



        left = tc->data_end - avio_tell(s->pb);

        size = FFMIN(left, 1024);

        if (size <= 0)

            return AVERROR_EOF;



        ret = av_get_packet(pb, pkt, size);

        if (ret < 0)

            return ret;



        pkt->stream_index = 0;

    } else {

        ret = ff_raw_read_partial_packet(s, pkt);

    }



    return ret;

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)

{

    TAKDemuxContext *tc = VAR_0->priv_data;

    int VAR_2;



    if (tc->mlast_frame) {

        AVIOContext *pb = VAR_0->pb;

        int64_t size, left;



        left = tc->data_end - avio_tell(VAR_0->pb);

        size = FFMIN(left, 1024);

        if (size <= 0)

            return AVERROR_EOF;



        VAR_2 = av_get_packet(pb, VAR_1, size);

        if (VAR_2 < 0)

            return VAR_2;



        VAR_1->stream_index = 0;

    } else {

        VAR_2 = ff_raw_read_partial_packet(VAR_0, VAR_1);

    }



    return VAR_2;

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{ TAKDemuxContext *tc = VAR_0->priv_data; int VAR_2; if (tc->mlast_frame) { AVIOContext *pb = VAR_0->pb; int64_t size, left; left = tc->data_end - avio_tell(VAR_0->pb); size = FFMIN(left, 1024); if (size <= 0)
return AVERROR_EOF; VAR_2 = av_get_packet(pb, VAR_1, size); if (VAR_2 < 0)
return VAR_2; VAR_1->stream_index = 0; } else { VAR_2 = ff_raw_read_partial_packet(VAR_0, VAR_1); } return VAR_2; }