*/
#include "avformat.h"
+#include "internal.h"
static int probe(AVProbeData *p)
{
- // the single file i have starts with that, i dont know if others do too
+ // the single file I have starts with that, I do not know if others do, too
if( p->buf[0] == 1
&& p->buf[1] == 1
&& p->buf[2] == 3
return 0;
}
-static int read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int read_header(AVFormatContext *s)
{
AVStream *st;
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG4;
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 64, 1, 90000);
+ avpriv_set_pts_info(st, 64, 1, 90000);
return 0;
ret = av_append_packet(s->pb, pkt, size);
if (ret < 0) {
av_log(s, AV_LOG_ERROR, "failed to grow packet\n");
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return ret;
}
}
AVInputFormat ff_iv8_demuxer = {
.name = "iv8",
- .long_name = NULL_IF_CONFIG_SMALL("A format generated by IndigoVision 8000 video server"),
+ .long_name = NULL_IF_CONFIG_SMALL("IndigoVision 8000 video"),
.read_probe = probe,
.read_header = read_header,
.read_packet = read_packet,
- .flags= AVFMT_GENERIC_INDEX,
- .value = CODEC_ID_MPEG4,
+ .flags = AVFMT_GENERIC_INDEX,
};