/*
* THP Demuxer
- * Copyright (c) 2007 Marco Gerards.
+ * Copyright (c) 2007 Marco Gerards
*
* This file is part of FFmpeg.
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
typedef struct ThpDemuxContext {
{
ThpDemuxContext *thp = s->priv_data;
AVStream *st;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
int i;
/* Read the file header. */
/* The denominator and numerator are switched because 1/fps
is required. */
av_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
- st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_THP;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = get_be32(pb);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_ADPCM_THP;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->channels = get_be32(pb); /* numChannels. */
AVPacket *pkt)
{
ThpDemuxContext *thp = s->priv_data;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
int size;
int ret;
AVInputFormat thp_demuxer = {
"thp",
- "THP",
+ NULL_IF_CONFIG_SMALL("THP"),
sizeof(ThpDemuxContext),
thp_probe,
thp_read_header,