static int decode_phys_chunk(AVCodecContext *avctx, PNGDecContext *s)

{

    if (s->state & PNG_IDAT) {

        av_log(avctx, AV_LOG_ERROR, "pHYs after IDAT\n");

        return AVERROR_INVALIDDATA;

    }

    avctx->sample_aspect_ratio.num = bytestream2_get_be32(&s->gb);

    avctx->sample_aspect_ratio.den = bytestream2_get_be32(&s->gb);

    if (avctx->sample_aspect_ratio.num < 0 || avctx->sample_aspect_ratio.den < 0)

        avctx->sample_aspect_ratio = (AVRational){ 0, 1 };

    bytestream2_skip(&s->gb, 1); /* unit specifier */

    bytestream2_skip(&s->gb, 4); /* crc */



    return 0;

}

static int decode_phys_chunk(AVCodecContext *avctx, PNGDecContext *s)

{

    if (s->state & PNG_IDAT) {

        av_log(avctx, AV_LOG_ERROR, "pHYs after IDAT\n");

        return AVERROR_INVALIDDATA;

    }

    avctx->sample_aspect_ratio.num = bytestream2_get_be32(&s->gb);

    avctx->sample_aspect_ratio.den = bytestream2_get_be32(&s->gb);

    if (avctx->sample_aspect_ratio.num < 0 || avctx->sample_aspect_ratio.den < 0)

        avctx->sample_aspect_ratio = (AVRational){ 0, 1 };

    bytestream2_skip(&s->gb, 1); 

    bytestream2_skip(&s->gb, 4); 



    return 0;

}

    if (s->state & PNG_IDAT) {     if (s->state & PNG_IDAT) {     if (s->state & PNG_IDAT) {
static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1)

{

    if (VAR_1->state & PNG_IDAT) {

        av_log(VAR_0, AV_LOG_ERROR, "pHYs after IDAT\n");

        return AVERROR_INVALIDDATA;

    }

    VAR_0->sample_aspect_ratio.num = bytestream2_get_be32(&VAR_1->gb);

    VAR_0->sample_aspect_ratio.den = bytestream2_get_be32(&VAR_1->gb);

    if (VAR_0->sample_aspect_ratio.num < 0 || VAR_0->sample_aspect_ratio.den < 0)

        VAR_0->sample_aspect_ratio = (AVRational){ 0, 1 };

    bytestream2_skip(&VAR_1->gb, 1); 

    bytestream2_skip(&VAR_1->gb, 4); 



    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1)
{ if (VAR_1->state & PNG_IDAT) { av_log(VAR_0, AV_LOG_ERROR, "pHYs after IDAT\n"); return AVERROR_INVALIDDATA; } VAR_0->sample_aspect_ratio.num = bytestream2_get_be32(&VAR_1->gb); VAR_0->sample_aspect_ratio.den = bytestream2_get_be32(&VAR_1->gb); if (VAR_0->sample_aspect_ratio.num < 0 || VAR_0->sample_aspect_ratio.den < 0)
VAR_0->sample_aspect_ratio = (AVRational){ 0, 1 }; bytestream2_skip(&VAR_1->gb, 1); bytestream2_skip(&VAR_1->gb, 4); return 0; }