#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define JV_PREAMBLE_SIZE 5
avio_skip(pb, 80);
- ast = av_new_stream(s, 0);
- vst = av_new_stream(s, 1);
+ ast = avformat_new_stream(s, NULL);
+ vst = avformat_new_stream(s, NULL);
if (!ast || !vst)
return AVERROR(ENOMEM);
- vst->codec->codec_type = CODEC_TYPE_VIDEO;
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_JV;
vst->codec->codec_tag = 0; /* no fourcc */
vst->codec->width = avio_rl16(pb);
vst->codec->height = avio_rl16(pb);
vst->nb_frames =
ast->nb_index_entries = avio_rl16(pb);
- av_set_pts_info(vst, 64, avio_rl16(pb), 1000);
+ avpriv_set_pts_info(vst, 64, avio_rl16(pb), 1000);
avio_skip(pb, 4);
- ast->codec->codec_type = CODEC_TYPE_AUDIO;
+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_U8;
ast->codec->codec_tag = 0; /* no fourcc */
ast->codec->sample_rate = avio_rl16(pb);
ast->codec->channels = 1;
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
avio_skip(pb, 10);
return AVERROR(ENOMEM);
pkt->stream_index = 0;
pkt->pts = e->timestamp;
- pkt->flags |= PKT_FLAG_KEY;
+ pkt->flags |= AV_PKT_FLAG_KEY;
return 0;
}
case JV_VIDEO:
pkt->stream_index = 1;
pkt->pts = jv->pts;
if (jvf->video_type != 1)
- pkt->flags |= PKT_FLAG_KEY;
+ pkt->flags |= AV_PKT_FLAG_KEY;
return 0;
}
case JV_PADDING:
int i;
if (flags & (AVSEEK_FLAG_BYTE|AVSEEK_FLAG_FRAME))
- return AVERROR_NOTSUPP;
+ return AVERROR(ENOSYS);
switch(stream_index) {
case 0: