static int read_packet(AVFormatContext *s,

                       AVPacket *pkt)

{

    FilmstripDemuxContext *film = s->priv_data;

    AVStream *st = s->streams[0];



    if (s->pb->eof_reached)

        return AVERROR(EIO);

    pkt->dts = avio_tell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);

    pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);

    avio_skip(s->pb, st->codec->width * film->leading * 4);

    if (pkt->size < 0)

        return pkt->size;

    pkt->flags |= AV_PKT_FLAG_KEY;

    return 0;

}

static int read_packet(AVFormatContext *s,

                       AVPacket *pkt)

{

    FilmstripDemuxContext *film = s->priv_data;

    AVStream *st = s->streams[0];



    if (s->pb->eof_reached)

        return AVERROR(EIO);

    pkt->dts = avio_tell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);

    pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);

    avio_skip(s->pb, st->codec->width * film->leading * 4);

    if (pkt->size < 0)

        return pkt->size;

    pkt->flags |= AV_PKT_FLAG_KEY;

    return 0;

}

    avio_skip(s->pb, st->codec->width * film->leading * 4);
static int FUNC_0(AVFormatContext *VAR_0,

                       AVPacket *VAR_1)

{

    FilmstripDemuxContext *film = VAR_0->priv_data;

    AVStream *st = VAR_0->streams[0];



    if (VAR_0->pb->eof_reached)

        return AVERROR(EIO);

    VAR_1->dts = avio_tell(VAR_0->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);

    VAR_1->size = av_get_packet(VAR_0->pb, VAR_1, st->codec->width * st->codec->height * 4);

    avio_skip(VAR_0->pb, st->codec->width * film->leading * 4);

    if (VAR_1->size < 0)

        return VAR_1->size;

    VAR_1->flags |= AV_PKT_FLAG_KEY;

    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{ FilmstripDemuxContext *film = VAR_0->priv_data; AVStream *st = VAR_0->streams[0]; if (VAR_0->pb->eof_reached)
return AVERROR(EIO); VAR_1->dts = avio_tell(VAR_0->pb) / (st->codec->width * (st->codec->height + film->leading) * 4); VAR_1->size = av_get_packet(VAR_0->pb, VAR_1, st->codec->width * st->codec->height * 4); avio_skip(VAR_0->pb, st->codec->width * film->leading * 4); if (VAR_1->size < 0)
return VAR_1->size; VAR_1->flags |= AV_PKT_FLAG_KEY; return 0; }