*/
/**
- * @file libavformat/westwood.c
+ * @file
* Westwood Studios VQA & AUD file demuxers
* by Mike Melanson (melanson@pcisys.net)
* for more information on the Westwood file formats, visit:
#define VQA_HEADER_SIZE 0x2A
#define VQA_FRAMERATE 15
-#define VQA_VIDEO_PTS_INC (90000 / VQA_FRAMERATE)
#define VQA_PREAMBLE_SIZE 8
typedef struct WsAudDemuxContext {
int video_stream_index;
int64_t audio_frame_counter;
- int64_t video_pts;
} WsVqaDemuxContext;
static int wsaud_probe(AVProbeData *p)
if (!st)
return AVERROR(ENOMEM);
av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = wsaud->audio_type;
st->codec->codec_tag = 0; /* no tag */
st->codec->channels = wsaud->audio_channels;
return AVERROR(ENOMEM);
av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
wsvqa->video_stream_index = st->index;
- st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_WS_VQA;
st->codec->codec_tag = 0; /* no fourcc */
if (!st)
return AVERROR(ENOMEM);
av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (AV_RL16(&header[0]) == 1)
st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
else
url_fseek(pb, chunk_size, SEEK_CUR);
} while (chunk_tag != FINF_TAG);
- wsvqa->video_pts = wsvqa->audio_frame_counter = 0;
-
return 0;
}
wsvqa->audio_frame_counter += AV_RL16(pkt->data) / wsvqa->audio_channels;
} else {
pkt->stream_index = wsvqa->video_stream_index;
- wsvqa->video_pts += VQA_VIDEO_PTS_INC;
}
/* stay on 16-bit alignment */
if (skip_byte)