Mercurial > libavformat.hg
comparison asfenc.c @ 5913:11bb10c37225 libavformat
Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.
Patch by Jean-Daniel Dupas, devlists shadowlab org
author | cehoyos |
---|---|
date | Wed, 31 Mar 2010 12:29:58 +0000 |
parents | 536e5527c1e0 |
children |
comparison
equal
deleted
inserted
replaced
5912:10f577d87c71 | 5913:11bb10c37225 |
---|---|
666 ASFContext *asf = s->priv_data; | 666 ASFContext *asf = s->priv_data; |
667 ByteIOContext *pb = &asf->pb; | 667 ByteIOContext *pb = &asf->pb; |
668 int val; | 668 int val; |
669 | 669 |
670 val = stream->num; | 670 val = stream->num; |
671 if (flags & PKT_FLAG_KEY) | 671 if (flags & AV_PKT_FLAG_KEY) |
672 val |= ASF_PL_FLAG_KEY_FRAME; | 672 val |= ASF_PL_FLAG_KEY_FRAME; |
673 put_byte(pb, val); | 673 put_byte(pb, val); |
674 | 674 |
675 put_byte(pb, stream->seq); //Media object number | 675 put_byte(pb, stream->seq); //Media object number |
676 put_le32(pb, m_obj_offset); //Offset Into Media Object | 676 put_le32(pb, m_obj_offset); //Offset Into Media Object |
769 | 769 |
770 codec = s->streams[pkt->stream_index]->codec; | 770 codec = s->streams[pkt->stream_index]->codec; |
771 stream = &asf->streams[pkt->stream_index]; | 771 stream = &asf->streams[pkt->stream_index]; |
772 | 772 |
773 if(codec->codec_type == AVMEDIA_TYPE_AUDIO) | 773 if(codec->codec_type == AVMEDIA_TYPE_AUDIO) |
774 flags &= ~PKT_FLAG_KEY; | 774 flags &= ~AV_PKT_FLAG_KEY; |
775 | 775 |
776 pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; | 776 pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; |
777 assert(pts != AV_NOPTS_VALUE); | 777 assert(pts != AV_NOPTS_VALUE); |
778 duration = pts * 10000; | 778 duration = pts * 10000; |
779 asf->duration= FFMAX(asf->duration, duration + pkt->duration * 10000); | 779 asf->duration= FFMAX(asf->duration, duration + pkt->duration * 10000); |
780 | 780 |
781 packet_st = asf->nb_packets; | 781 packet_st = asf->nb_packets; |
782 put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags); | 782 put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags); |
783 | 783 |
784 /* check index */ | 784 /* check index */ |
785 if ((!asf->is_streamed) && (flags & PKT_FLAG_KEY)) { | 785 if ((!asf->is_streamed) && (flags & AV_PKT_FLAG_KEY)) { |
786 start_sec = (int)(duration / INT64_C(10000000)); | 786 start_sec = (int)(duration / INT64_C(10000000)); |
787 if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) { | 787 if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) { |
788 for(i=asf->nb_index_count;i<start_sec;i++) { | 788 for(i=asf->nb_index_count;i<start_sec;i++) { |
789 if (i>=asf->nb_index_memory_alloc) { | 789 if (i>=asf->nb_index_memory_alloc) { |
790 asf->nb_index_memory_alloc += ASF_INDEX_BLOCK; | 790 asf->nb_index_memory_alloc += ASF_INDEX_BLOCK; |