summaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f8b2d8d..59baa0d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -411,13 +411,13 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
dprintf(c->fc, "stype= %.4s\n", (char*)&type);
if (type == MKTAG('v','i','d','e'))
- st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
else if(type == MKTAG('s','o','u','n'))
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
else if(type == MKTAG('m','1','a',' '))
st->codec->codec_id = CODEC_ID_MP2;
else if(type == MKTAG('s','u','b','p'))
- st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
get_be32(pb); /* component manufacture */
get_be32(pb); /* component flags */
@@ -933,19 +933,19 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF);
- if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) {
- st->codec->codec_type = CODEC_TYPE_AUDIO;
- } else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */
+ if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ } else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */
format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */
id = ff_codec_get_id(codec_movvideo_tags, format);
if (id <= 0)
id = ff_codec_get_id(ff_codec_bmp_tags, format);
if (id > 0)
- st->codec->codec_type = CODEC_TYPE_VIDEO;
- else if(st->codec->codec_type == CODEC_TYPE_DATA){
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ else if(st->codec->codec_type == AVMEDIA_TYPE_DATA){
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
if(id > 0)
- st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
}
}
@@ -953,7 +953,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
(format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
(format >> 24) & 0xff, st->codec->codec_type);
- if(st->codec->codec_type==CODEC_TYPE_VIDEO) {
+ if(st->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
unsigned int color_depth, len;
int color_greyscale;
@@ -1057,7 +1057,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
}
st->codec->palctrl->palette_changed = 1;
}
- } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) {
+ } else if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO) {
int bits_per_sample, flags;
uint16_t version = get_be16(pb);
@@ -1137,7 +1137,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
st->codec->bits_per_coded_sample = bits_per_sample;
sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
}
- } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
+ } else if(st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){
// ttxt stsd contains display flags, justification, background
// color, fonts, and default styles, so fake an atom to read it
MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) };
@@ -1159,7 +1159,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
url_fskip(pb, a.size);
}
- if(st->codec->codec_type==CODEC_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
+ if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
st->codec->sample_rate= sc->time_scale;
/* special codec parameters handling */
@@ -1196,7 +1196,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
break;
case CODEC_ID_MP2:
case CODEC_ID_MP3:
- st->codec->codec_type = CODEC_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
case CODEC_ID_GSM:
@@ -1490,7 +1490,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
}
/* only use old uncompressed audio chunk demuxing when stts specifies it */
- if (!(st->codec->codec_type == CODEC_TYPE_AUDIO &&
+ if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
unsigned int current_sample = 0;
unsigned int stts_sample = 0;
@@ -1698,7 +1698,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
if (!sc) return AVERROR(ENOMEM);
st->priv_data = sc;
- st->codec->codec_type = CODEC_TYPE_DATA;
+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
sc->ffindex = st->index;
if ((ret = mov_read_default(c, pb, atom)) < 0)
@@ -1721,7 +1721,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
av_set_pts_info(st, 64, 1, sc->time_scale);
- if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
!st->codec->frame_size && sc->stts_count == 1) {
st->codec->frame_size = av_rescale(sc->stts_data[0].duration,
st->codec->sample_rate, sc->time_scale);
@@ -1741,7 +1741,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
} else
sc->pb = c->fc->pb;
- if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (st->codec->width != sc->width || st->codec->height != sc->height) {
AVRational r = av_d2q(((double)st->codec->height * sc->width) /
((double)st->codec->width * sc->height), INT_MAX);
@@ -2004,7 +2004,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
sc->ctts_data[sc->ctts_count].duration = get_be32(pb);
sc->ctts_count++;
}
- if ((keyframe = st->codec->codec_type == CODEC_TYPE_AUDIO ||
+ if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO ||
(flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000))
distance = 0;
av_add_index_entry(st, offset, dts, sample_size, distance,
OpenPOWER on IntegriCloud