Mercurial > libavformat.hg
comparison oggparsedirac.c @ 5910:536e5527c1e0 libavformat
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.
author | stefano |
---|---|
date | Tue, 30 Mar 2010 23:30:55 +0000 |
parents | 14f90d20ef05 |
children | 11bb10c37225 |
comparison
equal
deleted
inserted
replaced
5909:b8041f85c327 | 5910:536e5527c1e0 |
---|---|
37 | 37 |
38 init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8); | 38 init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8); |
39 if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) | 39 if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) |
40 return -1; | 40 return -1; |
41 | 41 |
42 st->codec->codec_type = CODEC_TYPE_VIDEO; | 42 st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
43 st->codec->codec_id = CODEC_ID_DIRAC; | 43 st->codec->codec_id = CODEC_ID_DIRAC; |
44 // dirac in ogg always stores timestamps as though the video were interlaced | 44 // dirac in ogg always stores timestamps as though the video were interlaced |
45 st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den}; | 45 st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den}; |
46 return 1; | 46 return 1; |
47 } | 47 } |
75 uint8_t *buf = os->buf + os->pstart; | 75 uint8_t *buf = os->buf + os->pstart; |
76 | 76 |
77 if (buf[0] != 'K') | 77 if (buf[0] != 'K') |
78 return 0; | 78 return 0; |
79 | 79 |
80 st->codec->codec_type = CODEC_TYPE_VIDEO; | 80 st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
81 st->codec->codec_id = CODEC_ID_DIRAC; | 81 st->codec->codec_id = CODEC_ID_DIRAC; |
82 st->time_base.den = AV_RB32(buf+8); | 82 st->time_base.den = AV_RB32(buf+8); |
83 st->time_base.num = AV_RB32(buf+12); | 83 st->time_base.num = AV_RB32(buf+12); |
84 return 1; | 84 return 1; |
85 } | 85 } |