Quoting Vittorio Giovara (2014-12-12 21:57:43) > From: James Almer <[email protected]> > > Signed-off-by: James Almer <[email protected]> > Signed-off-by: Michael Niedermayer <[email protected]> > Signed-off-by: Vittorio Giovara <[email protected]> > +static int vp8_header(AVFormatContext *s, int idx) > +{ > + struct ogg *ogg = s->priv_data; > + struct ogg_stream *os = ogg->streams + idx; > + uint8_t *p = os->buf + os->pstart; > + AVStream *st = s->streams[idx]; > + AVRational framerate; > + > + if (os->psize < 7 || p[0] != 0x4f) > + return 0; > + > + switch (p[5]){ > + case 0x01: > + if (os->psize < VP8_HEADER_SIZE) { > + av_log(s, AV_LOG_ERROR, "Invalid OggVP8 header packet"); > + return AVERROR_INVALIDDATA; > + } > + > + if (p[6] != 1) { > + av_log(s, AV_LOG_WARNING, > + "Unknown OggVP8 version %d.%d\n", p[6], p[7]); > + return AVERROR_INVALIDDATA; > + } > + > + st->codec->width = AV_RB16(p + 8); > + st->codec->height = AV_RB16(p + 10); > + st->sample_aspect_ratio.num = AV_RB24(p + 12); > + st->sample_aspect_ratio.den = AV_RB24(p + 15); > + framerate.den = AV_RB32(p + 18); > + framerate.num = AV_RB32(p + 22); > + > + avpriv_set_pts_info(st, 64, framerate.num, framerate.den);
This looks reversed. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
