It's only used by raw demuxers for storing the codec id.
| ... | ... |
@@ -70,7 +70,7 @@ static int adts_aac_read_header(AVFormatContext *s) |
| 70 | 70 |
return AVERROR(ENOMEM); |
| 71 | 71 |
|
| 72 | 72 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 73 |
- st->codec->codec_id = s->iformat->value; |
|
| 73 |
+ st->codec->codec_id = s->iformat->raw_codec_id; |
|
| 74 | 74 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 75 | 75 |
|
| 76 | 76 |
ff_id3v1_read(s); |
| ... | ... |
@@ -89,5 +89,5 @@ AVInputFormat ff_aac_demuxer = {
|
| 89 | 89 |
.read_packet = ff_raw_read_partial_packet, |
| 90 | 90 |
.flags= AVFMT_GENERIC_INDEX, |
| 91 | 91 |
.extensions = "aac", |
| 92 |
- .value = CODEC_ID_AAC, |
|
| 92 |
+ .raw_codec_id = CODEC_ID_AAC, |
|
| 93 | 93 |
}; |
| ... | ... |
@@ -78,7 +78,7 @@ AVInputFormat ff_ac3_demuxer = {
|
| 78 | 78 |
.read_packet = ff_raw_read_partial_packet, |
| 79 | 79 |
.flags= AVFMT_GENERIC_INDEX, |
| 80 | 80 |
.extensions = "ac3", |
| 81 |
- .value = CODEC_ID_AC3, |
|
| 81 |
+ .raw_codec_id = CODEC_ID_AC3, |
|
| 82 | 82 |
}; |
| 83 | 83 |
#endif |
| 84 | 84 |
|
| ... | ... |
@@ -96,6 +96,6 @@ AVInputFormat ff_eac3_demuxer = {
|
| 96 | 96 |
.read_packet = ff_raw_read_partial_packet, |
| 97 | 97 |
.flags= AVFMT_GENERIC_INDEX, |
| 98 | 98 |
.extensions = "eac3", |
| 99 |
- .value = CODEC_ID_EAC3, |
|
| 99 |
+ .raw_codec_id = CODEC_ID_EAC3, |
|
| 100 | 100 |
}; |
| 101 | 101 |
#endif |
| ... | ... |
@@ -94,7 +94,7 @@ static int adx_read_header(AVFormatContext *s) |
| 94 | 94 |
return ret; |
| 95 | 95 |
|
| 96 | 96 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 97 |
- st->codec->codec_id = s->iformat->value; |
|
| 97 |
+ st->codec->codec_id = s->iformat->raw_codec_id; |
|
| 98 | 98 |
|
| 99 | 99 |
avpriv_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate); |
| 100 | 100 |
|
| ... | ... |
@@ -108,6 +108,6 @@ AVInputFormat ff_adx_demuxer = {
|
| 108 | 108 |
.read_header = adx_read_header, |
| 109 | 109 |
.read_packet = adx_read_packet, |
| 110 | 110 |
.extensions = "adx", |
| 111 |
- .value = CODEC_ID_ADPCM_ADX, |
|
| 111 |
+ .raw_codec_id = CODEC_ID_ADPCM_ADX, |
|
| 112 | 112 |
.flags = AVFMT_GENERIC_INDEX, |
| 113 | 113 |
}; |
| ... | ... |
@@ -415,9 +415,9 @@ typedef struct AVInputFormat {
|
| 415 | 415 |
struct AVInputFormat *next; |
| 416 | 416 |
|
| 417 | 417 |
/** |
| 418 |
- * General purpose read-only value that the format can use. |
|
| 418 |
+ * Raw demuxers store their codec ID here. |
|
| 419 | 419 |
*/ |
| 420 |
- int value; |
|
| 420 |
+ int raw_codec_id; |
|
| 421 | 421 |
|
| 422 | 422 |
/** |
| 423 | 423 |
* Size of private data so that it can be allocated in the wrapper. |
| ... | ... |
@@ -62,7 +62,7 @@ static int gsm_read_header(AVFormatContext *s) |
| 62 | 62 |
return AVERROR(ENOMEM); |
| 63 | 63 |
|
| 64 | 64 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 65 |
- st->codec->codec_id = s->iformat->value; |
|
| 65 |
+ st->codec->codec_id = s->iformat->raw_codec_id; |
|
| 66 | 66 |
st->codec->channels = 1; |
| 67 | 67 |
st->codec->sample_rate = c->sample_rate; |
| 68 | 68 |
st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES; |
| ... | ... |
@@ -94,6 +94,6 @@ AVInputFormat ff_gsm_demuxer = {
|
| 94 | 94 |
.read_packet = gsm_read_packet, |
| 95 | 95 |
.flags = AVFMT_GENERIC_INDEX, |
| 96 | 96 |
.extensions = "gsm", |
| 97 |
- .value = CODEC_ID_GSM, |
|
| 97 |
+ .raw_codec_id = CODEC_ID_GSM, |
|
| 98 | 98 |
.priv_class = &class, |
| 99 | 99 |
}; |
| ... | ... |
@@ -68,6 +68,6 @@ AVInputFormat ff_ingenient_demuxer = {
|
| 68 | 68 |
.read_packet = ingenient_read_packet, |
| 69 | 69 |
.flags= AVFMT_GENERIC_INDEX, |
| 70 | 70 |
.extensions = "cgi", // FIXME |
| 71 |
- .value = CODEC_ID_MJPEG, |
|
| 71 |
+ .raw_codec_id = CODEC_ID_MJPEG, |
|
| 72 | 72 |
.priv_class = &ingenient_demuxer_class, |
| 73 | 73 |
}; |
| ... | ... |
@@ -38,7 +38,7 @@ int ff_raw_read_header(AVFormatContext *s) |
| 38 | 38 |
if (!st) |
| 39 | 39 |
return AVERROR(ENOMEM); |
| 40 | 40 |
|
| 41 |
- id = s->iformat->value; |
|
| 41 |
+ id = s->iformat->raw_codec_id; |
|
| 42 | 42 |
if (id == CODEC_ID_RAWVIDEO) {
|
| 43 | 43 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 44 | 44 |
} else {
|
| ... | ... |
@@ -126,7 +126,7 @@ int ff_raw_audio_read_header(AVFormatContext *s) |
| 126 | 126 |
if (!st) |
| 127 | 127 |
return AVERROR(ENOMEM); |
| 128 | 128 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 129 |
- st->codec->codec_id = s->iformat->value; |
|
| 129 |
+ st->codec->codec_id = s->iformat->raw_codec_id; |
|
| 130 | 130 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 131 | 131 |
st->start_time = 0; |
| 132 | 132 |
/* the parameters will be extracted from the compressed bitstream */ |
| ... | ... |
@@ -150,7 +150,7 @@ int ff_raw_video_read_header(AVFormatContext *s) |
| 150 | 150 |
} |
| 151 | 151 |
|
| 152 | 152 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 153 |
- st->codec->codec_id = s->iformat->value; |
|
| 153 |
+ st->codec->codec_id = s->iformat->raw_codec_id; |
|
| 154 | 154 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 155 | 155 |
|
| 156 | 156 |
if ((ret = av_parse_video_rate(&framerate, s1->framerate)) < 0) {
|
| ... | ... |
@@ -182,7 +182,7 @@ AVInputFormat ff_g722_demuxer = {
|
| 182 | 182 |
.read_packet = ff_raw_read_partial_packet, |
| 183 | 183 |
.flags= AVFMT_GENERIC_INDEX, |
| 184 | 184 |
.extensions = "g722,722", |
| 185 |
- .value = CODEC_ID_ADPCM_G722, |
|
| 185 |
+ .raw_codec_id = CODEC_ID_ADPCM_G722, |
|
| 186 | 186 |
}; |
| 187 | 187 |
#endif |
| 188 | 188 |
|
| ... | ... |
@@ -194,7 +194,7 @@ AVInputFormat ff_latm_demuxer = {
|
| 194 | 194 |
.read_packet = ff_raw_read_partial_packet, |
| 195 | 195 |
.flags= AVFMT_GENERIC_INDEX, |
| 196 | 196 |
.extensions = "latm", |
| 197 |
- .value = CODEC_ID_AAC_LATM, |
|
| 197 |
+ .raw_codec_id = CODEC_ID_AAC_LATM, |
|
| 198 | 198 |
}; |
| 199 | 199 |
#endif |
| 200 | 200 |
|
| ... | ... |
@@ -210,7 +210,7 @@ AVInputFormat ff_mlp_demuxer = {
|
| 210 | 210 |
.read_packet = ff_raw_read_partial_packet, |
| 211 | 211 |
.flags= AVFMT_GENERIC_INDEX, |
| 212 | 212 |
.extensions = "mlp", |
| 213 |
- .value = CODEC_ID_MLP, |
|
| 213 |
+ .raw_codec_id = CODEC_ID_MLP, |
|
| 214 | 214 |
}; |
| 215 | 215 |
#endif |
| 216 | 216 |
|
| ... | ... |
@@ -222,7 +222,7 @@ AVInputFormat ff_truehd_demuxer = {
|
| 222 | 222 |
.read_packet = ff_raw_read_partial_packet, |
| 223 | 223 |
.flags= AVFMT_GENERIC_INDEX, |
| 224 | 224 |
.extensions = "thd", |
| 225 |
- .value = CODEC_ID_TRUEHD, |
|
| 225 |
+ .raw_codec_id = CODEC_ID_TRUEHD, |
|
| 226 | 226 |
}; |
| 227 | 227 |
#endif |
| 228 | 228 |
|
| ... | ... |
@@ -234,7 +234,7 @@ AVInputFormat ff_shorten_demuxer = {
|
| 234 | 234 |
.read_packet = ff_raw_read_partial_packet, |
| 235 | 235 |
.flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK, |
| 236 | 236 |
.extensions = "shn", |
| 237 |
- .value = CODEC_ID_SHORTEN, |
|
| 237 |
+ .raw_codec_id = CODEC_ID_SHORTEN, |
|
| 238 | 238 |
}; |
| 239 | 239 |
#endif |
| 240 | 240 |
|
| ... | ... |
@@ -67,7 +67,7 @@ AVInputFormat ff_ ## shortname ## _demuxer = {\
|
| 67 | 67 |
.read_packet = ff_raw_read_partial_packet,\ |
| 68 | 68 |
.extensions = ext,\ |
| 69 | 69 |
.flags = AVFMT_GENERIC_INDEX,\ |
| 70 |
- .value = id,\ |
|
| 70 |
+ .raw_codec_id = id,\ |
|
| 71 | 71 |
.priv_data_size = sizeof(FFRawVideoDemuxerContext),\ |
| 72 | 72 |
.priv_class = &shortname ## _demuxer_class,\ |
| 73 | 73 |
}; |
| ... | ... |
@@ -68,6 +68,6 @@ AVInputFormat ff_rawvideo_demuxer = {
|
| 68 | 68 |
.read_packet = rawvideo_read_packet, |
| 69 | 69 |
.flags= AVFMT_GENERIC_INDEX, |
| 70 | 70 |
.extensions = "yuv,cif,qcif,rgb", |
| 71 |
- .value = CODEC_ID_RAWVIDEO, |
|
| 71 |
+ .raw_codec_id = CODEC_ID_RAWVIDEO, |
|
| 72 | 72 |
.priv_class = &rawvideo_demuxer_class, |
| 73 | 73 |
}; |