switch(enc->codec_type) {
- case CODEC_TYPE_AUDIO:
+ case AVMEDIA_TYPE_AUDIO:
wav_extra_size = 0;
extra_size = 18 + wav_extra_size;
extra_size2 = 8;
break;
default:
- case CODEC_TYPE_VIDEO:
+ case AVMEDIA_TYPE_VIDEO:
wav_extra_size = enc->extradata_size;
extra_size = 0x33 + wav_extra_size;
extra_size2 = 0;
}
hpos = put_header(pb, &ff_asf_stream_header);
- if (enc->codec_type == CODEC_TYPE_AUDIO) {
+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
put_guid(pb, &ff_asf_audio_stream);
put_guid(pb, &ff_asf_audio_conceal_spread);
} else {
put_le16(pb, n + 1); /* stream number */
put_le32(pb, 0); /* ??? */
- if (enc->codec_type == CODEC_TYPE_AUDIO) {
+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
/* WAVEFORMATEX header */
int wavsize = ff_put_wav_header(pb, enc);
if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) {
enc = s->streams[n]->codec;
p = avcodec_find_encoder(enc->codec_id);
- if(enc->codec_type == CODEC_TYPE_AUDIO)
+ if(enc->codec_type == AVMEDIA_TYPE_AUDIO)
put_le16(pb, 2);
- else if(enc->codec_type == CODEC_TYPE_VIDEO)
+ else if(enc->codec_type == AVMEDIA_TYPE_VIDEO)
put_le16(pb, 1);
else
put_le16(pb, -1);
/* id */
- if (enc->codec_type == CODEC_TYPE_AUDIO) {
+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
put_le16(pb, 2);
put_le16(pb, enc->codec_tag);
} else {
int val;
val = stream->num;
- if (flags & PKT_FLAG_KEY)
+ if (flags & AV_PKT_FLAG_KEY)
val |= ASF_PL_FLAG_KEY_FRAME;
put_byte(pb, val);
// multi payloads
frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS - PACKET_HEADER_MIN_SIZE - 1;
- if(frag_len1 < payload_len && avst->codec->codec_type == CODEC_TYPE_AUDIO){
+ if(frag_len1 < payload_len && avst->codec->codec_type == AVMEDIA_TYPE_AUDIO){
flush_packet(s);
continue;
}
codec = s->streams[pkt->stream_index]->codec;
stream = &asf->streams[pkt->stream_index];
- if(codec->codec_type == CODEC_TYPE_AUDIO)
- flags &= ~PKT_FLAG_KEY;
+ if(codec->codec_type == AVMEDIA_TYPE_AUDIO)
+ flags &= ~AV_PKT_FLAG_KEY;
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
assert(pts != AV_NOPTS_VALUE);
put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags);
/* check index */
- if ((!asf->is_streamed) && (flags & PKT_FLAG_KEY)) {
+ if ((!asf->is_streamed) && (flags & AV_PKT_FLAG_KEY)) {
start_sec = (int)(duration / INT64_C(10000000));
if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) {
for(i=asf->nb_index_count;i<start_sec;i++) {