changeset 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 10f577d87c71
children ae90b07a6f29
files anm.c asfdec.c asfenc.c assdec.c avidec.c avienc.c avs.c bink.c c93.c dv.c electronicarts.c ffmdec.c ffmenc.c filmstripdec.c flvdec.c flvenc.c iff.c img2.c libnut.c lmlm4.c matroskadec.c matroskaenc.c mov.c movenc.c mpegenc.c msnwc_tcp.c nsvdec.c nutdec.c nutenc.c nuv.c oggdec.c oggenc.c oggparsedirac.c oggparseogm.c oggparsetheora.c output-example.c rmdec.c rmenc.c rpl.c seek.c siff.c tmv.c utils.c vc1test.c vc1testenc.c yop.c
diffstat 46 files changed, 73 insertions(+), 73 deletions(-) [+]
line wrap: on
line diff
--- a/anm.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/anm.c	Wed Mar 31 12:29:58 2010 +0000
@@ -219,7 +219,7 @@
     if (pkt->size < 0)
         return pkt->size;
     if (p->base_record + anm->record == 0)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     anm->record++;
     return 0;
--- a/asfdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/asfdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -888,12 +888,12 @@
             asf_st->pkt.pos =
             asf_st->packet_pos= asf->packet_pos;
 //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
-//asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY,
+//asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & AV_PKT_FLAG_KEY,
 //s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size);
             if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
                 asf->packet_key_frame = 1;
             if (asf->packet_key_frame)
-                asf_st->pkt.flags |= PKT_FLAG_KEY;
+                asf_st->pkt.flags |= AV_PKT_FLAG_KEY;
         }
 
         /* read data */
@@ -1068,7 +1068,7 @@
         pts= pkt->pts;
 
         av_free_packet(pkt);
-        if(pkt->flags&PKT_FLAG_KEY){
+        if(pkt->flags&AV_PKT_FLAG_KEY){
             i= pkt->stream_index;
 
             asf_st= s->streams[i]->priv_data;
--- a/asfenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/asfenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -668,7 +668,7 @@
     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);
 
@@ -771,7 +771,7 @@
     stream = &asf->streams[pkt->stream_index];
 
     if(codec->codec_type == AVMEDIA_TYPE_AUDIO)
-        flags &= ~PKT_FLAG_KEY;
+        flags &= ~AV_PKT_FLAG_KEY;
 
     pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
     assert(pts != AV_NOPTS_VALUE);
@@ -782,7 +782,7 @@
     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++) {
--- a/assdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/assdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -165,7 +165,7 @@
 
     end= strchr(p, '\n');
     av_new_packet(pkt, end ? end-p+1 : strlen(p));
-    pkt->flags |= PKT_FLAG_KEY;
+    pkt->flags |= AV_PKT_FLAG_KEY;
     pkt->pos= p - ass->event_buffer + s->streams[0]->codec->extradata_size;
     pkt->pts= pkt->dts= get_pts(p);
     memcpy(pkt->data, p, pkt->size);
--- a/avidec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/avidec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -777,7 +777,7 @@
             size = dv_produce_packet(avi->dv_demux, pkt,
                                     pkt->data, pkt->size);
             pkt->destruct = dstr;
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
         } else {
             /* XXX: How to handle B-frames in AVI? */
             pkt->dts = ast->frame_offset;
@@ -797,10 +797,10 @@
 
                 if(index >= 0 && e->timestamp == ast->frame_offset){
                     if (e->flags & AVINDEX_KEYFRAME)
-                        pkt->flags |= PKT_FLAG_KEY;
+                        pkt->flags |= AV_PKT_FLAG_KEY;
                 }
             } else {
-                pkt->flags |= PKT_FLAG_KEY;
+                pkt->flags |= AV_PKT_FLAG_KEY;
             }
             if(ast->sample_size)
                 ast->frame_offset += pkt->size;
@@ -885,7 +885,7 @@
 
 
             if(   (st->discard >= AVDISCARD_DEFAULT && size==0)
-               /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & PKT_FLAG_KEY))*/ //FIXME needs a little reordering
+               /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
                || st->discard >= AVDISCARD_ALL){
                 if(ast->sample_size) ast->frame_offset += pkt->size;
                 else                 ast->frame_offset++;
--- a/avienc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/avienc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -540,7 +540,7 @@
     }
 
     avi_stream2fourcc(&tag[0], stream_index, enc->codec_type);
-    if(pkt->flags&PKT_FLAG_KEY)
+    if(pkt->flags&AV_PKT_FLAG_KEY)
         flags = 0x10;
     if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
        avist->audio_strm_length += size;
--- a/avs.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/avs.c	Wed Mar 31 12:29:58 2010 +0000
@@ -113,7 +113,7 @@
     pkt->size = ret + palette_size;
     pkt->stream_index = avs->st_video->index;
     if (sub_type == 0)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     return 0;
 }
@@ -134,7 +134,7 @@
         return ret;
 
     pkt->stream_index = avs->st_audio->index;
-    pkt->flags |= PKT_FLAG_KEY;
+    pkt->flags |= AV_PKT_FLAG_KEY;
 
     return size;
 }
--- a/bink.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/bink.c	Wed Mar 31 12:29:58 2010 +0000
@@ -233,7 +233,7 @@
         return ret;
     pkt->stream_index = 0;
     pkt->pts = bink->video_pts++;
-    pkt->flags |= PKT_FLAG_KEY;
+    pkt->flags |= AV_PKT_FLAG_KEY;
 
     /* -1 instructs the next call to read_packet() to read the next frame */
     bink->current_track = -1;
--- a/c93.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/c93.c	Wed Mar 31 12:29:58 2010 +0000
@@ -126,7 +126,7 @@
             ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
             if (ret > 0) {
                 pkt->stream_index = 1;
-                pkt->flags |= PKT_FLAG_KEY;
+                pkt->flags |= AV_PKT_FLAG_KEY;
                 return ret;
             }
         }
@@ -182,7 +182,7 @@
 
     /* only the first frame is guaranteed to not reference previous frames */
     if (c93->current_block == 0 && c93->current_frame == 0) {
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
         pkt->data[0] |= C93_FIRST_FRAME;
     }
     return 0;
--- a/dv.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/dv.c	Wed Mar 31 12:29:58 2010 +0000
@@ -221,7 +221,7 @@
            c->audio_pkt[i].size         = 0;
            c->audio_pkt[i].data         = c->audio_buf[i];
            c->audio_pkt[i].stream_index = c->ast[i]->index;
-           c->audio_pkt[i].flags       |= PKT_FLAG_KEY;
+           c->audio_pkt[i].flags       |= AV_PKT_FLAG_KEY;
        }
        c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
        c->ast[i]->codec->channels    = 2;
@@ -355,7 +355,7 @@
     av_init_packet(pkt);
     pkt->data         = buf;
     pkt->size         = size;
-    pkt->flags       |= PKT_FLAG_KEY;
+    pkt->flags       |= AV_PKT_FLAG_KEY;
     pkt->stream_index = c->vst->id;
     pkt->pts          = c->frames;
 
--- a/electronicarts.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/electronicarts.c	Wed Mar 31 12:29:58 2010 +0000
@@ -520,7 +520,7 @@
         case pQGT_TAG:
         case TGQs_TAG:
         case MADk_TAG:
-            key = PKT_FLAG_KEY;
+            key = AV_PKT_FLAG_KEY;
         case MVIf_TAG:
         case fVGT_TAG:
         case MADm_TAG:
@@ -537,7 +537,7 @@
         case MV0K_TAG:
         case MPCh_TAG:
         case pIQT_TAG:
-            key = PKT_FLAG_KEY;
+            key = AV_PKT_FLAG_KEY;
         case MV0F_TAG:
 get_video_packet:
             ret = av_get_packet(pb, pkt, chunk_size);
--- a/ffmdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/ffmdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -432,7 +432,7 @@
         }
         pkt->pos = url_ftell(s->pb);
         if (ffm->header[1] & FLAG_KEY_FRAME)
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
 
         ffm->read_state = READ_HEADER;
         if (ffm_read_data(s, pkt->data, size, 0) != size) {
--- a/ffmenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/ffmenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -210,7 +210,7 @@
     /* packet size & key_frame */
     header[0] = pkt->stream_index;
     header[1] = 0;
-    if (pkt->flags & PKT_FLAG_KEY)
+    if (pkt->flags & AV_PKT_FLAG_KEY)
         header[1] |= FLAG_KEY_FRAME;
     AV_WB24(header+2, pkt->size);
     AV_WB24(header+5, pkt->duration);
--- a/filmstripdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/filmstripdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -87,7 +87,7 @@
     url_fskip(s->pb, st->codec->width * film->leading * 4);
     if (pkt->size < 0)
         return pkt->size;
-    pkt->flags |= PKT_FLAG_KEY;
+    pkt->flags |= AV_PKT_FLAG_KEY;
     return 0;
 }
 
--- a/flvdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/flvdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -437,7 +437,7 @@
     pkt->stream_index = st->index;
 
     if (is_audio || ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY))
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     return ret;
 }
--- a/flvenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/flvenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -351,7 +351,7 @@
             return -1;
         }
 
-        flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER;
+        flags |= pkt->flags & AV_PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER;
     } else {
         assert(enc->codec_type == AVMEDIA_TYPE_AUDIO);
         flags = get_audio_flags(enc);
--- a/iff.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/iff.c	Wed Mar 31 12:29:58 2010 +0000
@@ -263,7 +263,7 @@
     }
 
     if(iff->sent_bytes == 0)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         iff->sent_bytes += PACKET_SIZE;
--- a/img2.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/img2.c	Wed Mar 31 12:29:58 2010 +0000
@@ -292,7 +292,7 @@
 
     av_new_packet(pkt, size[0] + size[1] + size[2]);
     pkt->stream_index = 0;
-    pkt->flags |= PKT_FLAG_KEY;
+    pkt->flags |= AV_PKT_FLAG_KEY;
 
     pkt->size= 0;
     for(i=0; i<3; i++){
--- a/libnut.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/libnut.c	Wed Mar 31 12:29:58 2010 +0000
@@ -128,7 +128,7 @@
     p.len = pkt->size;
     p.stream = pkt->stream_index;
     p.pts = pkt->pts;
-    p.flags = pkt->flags & PKT_FLAG_KEY ? NUT_FLAG_KEY : 0;
+    p.flags = pkt->flags & AV_PKT_FLAG_KEY ? NUT_FLAG_KEY : 0;
     p.next_pts = 0;
 
     nut_write_frame_reorder(priv->nut, &p, pkt->data);
@@ -269,7 +269,7 @@
         return -1;
     }
 
-    if (pd.flags & NUT_FLAG_KEY) pkt->flags |= PKT_FLAG_KEY;
+    if (pd.flags & NUT_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY;
     pkt->pts = pd.pts;
     pkt->stream_index = pd.stream;
     pkt->pos = url_ftell(avf->pb);
--- a/lmlm4.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/lmlm4.c	Wed Mar 31 12:29:58 2010 +0000
@@ -104,7 +104,7 @@
 
     switch (frame_type) {
         case LMLM4_I_FRAME:
-            pkt->flags = PKT_FLAG_KEY;
+            pkt->flags = AV_PKT_FLAG_KEY;
         case LMLM4_P_FRAME:
         case LMLM4_B_FRAME:
             pkt->stream_index = 0;
--- a/matroskadec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/matroskadec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -1547,7 +1547,7 @@
     flags = *data++;
     size -= 3;
     if (is_keyframe == -1)
-        is_keyframe = flags & 0x80 ? PKT_FLAG_KEY : 0;
+        is_keyframe = flags & 0x80 ? AV_PKT_FLAG_KEY : 0;
 
     if (cluster_time != (uint64_t)-1
         && (block_time >= 0 || cluster_time >= -block_time)) {
--- a/matroskaenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/matroskaenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -866,7 +866,7 @@
     MatroskaMuxContext *mkv = s->priv_data;
     ByteIOContext *pb = s->pb;
     AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
-    int keyframe = !!(pkt->flags & PKT_FLAG_KEY);
+    int keyframe = !!(pkt->flags & AV_PKT_FLAG_KEY);
     int duration = pkt->duration;
     int ret;
     int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
--- a/mov.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/mov.c	Wed Mar 31 12:29:58 2010 +0000
@@ -2344,7 +2344,7 @@
     }
     if (st->discard == AVDISCARD_ALL)
         goto retry;
-    pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? PKT_FLAG_KEY : 0;
+    pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;
     pkt->pos = sample->pos;
     dprintf(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
             pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration);
--- a/movenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/movenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -1987,7 +1987,7 @@
         trk->flags |= MOV_TRACK_CTTS;
     trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
     trk->cluster[trk->entry].flags = 0;
-    if (pkt->flags & PKT_FLAG_KEY) {
+    if (pkt->flags & AV_PKT_FLAG_KEY) {
         if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO) {
             mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);
             if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)
--- a/mpegenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/mpegenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -1156,7 +1156,7 @@
     int64_t pts, dts;
     PacketDesc *pkt_desc;
     const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE);
-    const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY);
+    const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & AV_PKT_FLAG_KEY);
 
     pts= pkt->pts;
     dts= pkt->dts;
--- a/msnwc_tcp.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/msnwc_tcp.c	Wed Mar 31 12:29:58 2010 +0000
@@ -125,7 +125,7 @@
     /* Some aMsn generated videos (or was it Mercury Messenger?) don't set
      * this bit and rely on the codec to get keyframe information */
     if(keyframe&1)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     return HEADER_SIZE + size;
 }
--- a/nsvdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/nsvdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -620,7 +620,7 @@
         av_get_packet(pb, pkt, vsize);
         pkt->stream_index = st[NSV_ST_VIDEO]->index;//NSV_ST_VIDEO;
         pkt->dts = nst->frame_offset;
-        pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
+        pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
 /*
         for (i = 0; i < MIN(8, vsize); i++)
             PRINT(("NSV video: [%d] = %02x\n", i, pkt->data[i]));
@@ -660,7 +660,7 @@
         }
         av_get_packet(pb, pkt, asize);
         pkt->stream_index = st[NSV_ST_AUDIO]->index;//NSV_ST_AUDIO;
-        pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
+        pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
         if( nsv->state == NSV_HAS_READ_NSVS && st[NSV_ST_VIDEO] ) {
             /* on a nsvs frame we have new information on a/v sync */
             pkt->dts = (((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset-1);
--- a/nutdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/nutdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -754,7 +754,7 @@
 
     pkt->stream_index = stream_id;
     if (stc->last_flags & FLAG_KEY)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
     pkt->pts = pts;
 
     return 0;
--- a/nutenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/nutenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -603,7 +603,7 @@
 static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc, AVPacket *pkt){
     int flags= 0;
 
-    if(pkt->flags & PKT_FLAG_KEY                ) flags |= FLAG_KEY;
+    if(pkt->flags & AV_PKT_FLAG_KEY             ) flags |= FLAG_KEY;
     if(pkt->stream_index != fc->stream_id       ) flags |= FLAG_STREAM_ID;
     if(pkt->size / fc->size_mul                 ) flags |= FLAG_SIZE_MSB;
     if(pkt->pts - nus->last_pts != fc->pts_delta) flags |= FLAG_CODED_PTS;
@@ -644,7 +644,7 @@
     FrameCode *fc;
     int64_t coded_pts;
     int best_length, frame_code, flags, needed_flags, i, header_idx, best_header_idx;
-    int key_frame = !!(pkt->flags & PKT_FLAG_KEY);
+    int key_frame = !!(pkt->flags & AV_PKT_FLAG_KEY);
     int store_sp=0;
     int ret;
 
--- a/nuv.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/nuv.c	Wed Mar 31 12:29:58 2010 +0000
@@ -220,7 +220,7 @@
                     return ret;
                 // HACK: we have no idea if it is a keyframe,
                 // but if we mark none seeking will not work at all.
-                pkt->flags |= PKT_FLAG_KEY;
+                pkt->flags |= AV_PKT_FLAG_KEY;
                 pkt->pos = pos;
                 pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->v_id;
@@ -240,7 +240,7 @@
                     break;
                 }
                 ret = av_get_packet(pb, pkt, size);
-                pkt->flags |= PKT_FLAG_KEY;
+                pkt->flags |= AV_PKT_FLAG_KEY;
                 pkt->pos = pos;
                 pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->a_id;
--- a/oggdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/oggdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -544,7 +544,7 @@
     // pflags might not be set until after this
     pts = ogg_calc_pts(s, idx, &dts);
 
-    if (os->keyframe_seek && !(os->pflags & PKT_FLAG_KEY))
+    if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY))
         goto retry;
     os->keyframe_seek = 0;
 
@@ -594,7 +594,7 @@
     while (url_ftell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)) {
         if (i == stream_index) {
             pts = ogg_calc_pts(s, i, NULL);
-            if (os->keyframe_seek && !(os->pflags & PKT_FLAG_KEY))
+            if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY))
                 pts = AV_NOPTS_VALUE;
         }
         if (pts != AV_NOPTS_VALUE)
--- a/oggenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/oggenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -256,7 +256,7 @@
     if (st->codec->codec_id == CODEC_ID_THEORA) {
         int64_t pts = oggstream->vrev < 1 ? pkt->pts : pkt->pts + pkt->duration;
         int pframe_count;
-        if (pkt->flags & PKT_FLAG_KEY)
+        if (pkt->flags & AV_PKT_FLAG_KEY)
             oggstream->last_kf_pts = pts;
         pframe_count = pts - oggstream->last_kf_pts;
         // prevent frame count from overflow if key frame flag is not set
--- a/oggparsedirac.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/oggparsedirac.c	Wed Mar 31 12:29:58 2010 +0000
@@ -59,7 +59,7 @@
     int64_t  pts   = dts + ((gp >> 9) & 0x1fff);
 
     if (!dist)
-        os->pflags |= PKT_FLAG_KEY;
+        os->pflags |= AV_PKT_FLAG_KEY;
 
     if (dts_out)
         *dts_out = dts;
@@ -93,7 +93,7 @@
     uint64_t pframe = gp & 0x3fffffff;
 
     if (!pframe)
-        os->pflags |= PKT_FLAG_KEY;
+        os->pflags |= AV_PKT_FLAG_KEY;
 
     return iframe + pframe;
 }
--- a/oggparseogm.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/oggparseogm.c	Wed Mar 31 12:29:58 2010 +0000
@@ -143,7 +143,7 @@
     int lb;
 
     if(*p & 8)
-        os->pflags |= PKT_FLAG_KEY;
+        os->pflags |= AV_PKT_FLAG_KEY;
 
     lb = ((*p & 2) << 1) | ((*p >> 6) & 3);
     os->pstart += lb + 1;
--- a/oggparsetheora.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/oggparsetheora.c	Wed Mar 31 12:29:58 2010 +0000
@@ -136,7 +136,7 @@
         iframe++;
 
     if(!pframe)
-        os->pflags |= PKT_FLAG_KEY;
+        os->pflags |= AV_PKT_FLAG_KEY;
 
     if (dts)
         *dts = iframe + pframe;
--- a/output-example.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/output-example.c	Wed Mar 31 12:29:58 2010 +0000
@@ -159,7 +159,7 @@
 
     if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
         pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
-    pkt.flags |= PKT_FLAG_KEY;
+    pkt.flags |= AV_PKT_FLAG_KEY;
     pkt.stream_index= st->index;
     pkt.data= audio_outbuf;
 
@@ -368,7 +368,7 @@
         AVPacket pkt;
         av_init_packet(&pkt);
 
-        pkt.flags |= PKT_FLAG_KEY;
+        pkt.flags |= AV_PKT_FLAG_KEY;
         pkt.stream_index= st->index;
         pkt.data= (uint8_t *)picture;
         pkt.size= sizeof(AVPicture);
@@ -385,7 +385,7 @@
             if (c->coded_frame->pts != AV_NOPTS_VALUE)
                 pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
             if(c->coded_frame->key_frame)
-                pkt.flags |= PKT_FLAG_KEY;
+                pkt.flags |= AV_PKT_FLAG_KEY;
             pkt.stream_index= st->index;
             pkt.data= video_outbuf;
             pkt.size= out_size;
--- a/rmdec.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/rmdec.c	Wed Mar 31 12:29:58 2010 +0000
@@ -804,7 +804,7 @@
 
     pkt->pts= timestamp;
     if (flags & 2)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     return st->codec->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
 }
@@ -828,7 +828,7 @@
     rm->audio_pkt_cnt--;
     if ((pkt->pts = ast->audiotimestamp) != AV_NOPTS_VALUE) {
         ast->audiotimestamp = AV_NOPTS_VALUE;
-        pkt->flags = PKT_FLAG_KEY;
+        pkt->flags = AV_PKT_FLAG_KEY;
     } else
         pkt->flags = 0;
     pkt->stream_index = st->index;
--- a/rmenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/rmenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -346,7 +346,7 @@
     /* XXX: suppress this malloc */
     buf1= (uint8_t*) av_malloc( size * sizeof(uint8_t) );
 
-    write_packet_header(s, stream, size, !!(flags & PKT_FLAG_KEY));
+    write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
 
     /* for AC-3, the words seem to be reversed */
     for(i=0;i<size;i+=2) {
@@ -365,7 +365,7 @@
     RMMuxContext *rm = s->priv_data;
     ByteIOContext *pb = s->pb;
     StreamInfo *stream = rm->video_stream;
-    int key_frame = !!(flags & PKT_FLAG_KEY);
+    int key_frame = !!(flags & AV_PKT_FLAG_KEY);
 
     /* XXX: this is incorrect: should be a parameter */
 
--- a/rpl.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/rpl.c	Wed Mar 31 12:29:58 2010 +0000
@@ -344,7 +344,7 @@
     // None of the Escape formats have keyframes, and the ADPCM
     // format used doesn't have keyframes.
     if (rpl->chunk_number == 0 && rpl->frame_in_part == 0)
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
 
     return ret;
 }
--- a/seek.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/seek.c	Wed Mar 31 12:29:58 2010 +0000
@@ -162,7 +162,7 @@
 
         // Evaluate key frames with known TS (or any frames, if AVSEEK_FLAG_ANY set).
         if (pts != AV_NOPTS_VALUE &&
-            ((flg & PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
+            ((flg & AV_PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
             if (flags & AVSEEK_FLAG_BYTE) {
                 // for byte seeking, use position as timestamp
                 ts        = pos;
--- a/siff.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/siff.c	Wed Mar 31 12:29:58 2010 +0000
@@ -216,7 +216,7 @@
             c->curstrm = 0;
         }
         if(!c->cur_frame || c->curstrm)
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
         if (c->curstrm == -1)
             c->cur_frame++;
     }else{
--- a/tmv.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/tmv.c	Wed Mar 31 12:29:58 2010 +0000
@@ -156,7 +156,7 @@
 
     pkt->stream_index  = tmv->stream_index;
     tmv->stream_index ^= 1;
-    pkt->flags        |= PKT_FLAG_KEY;
+    pkt->flags        |= AV_PKT_FLAG_KEY;
 
     return ret;
 }
--- a/utils.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/utils.c	Wed Mar 31 12:29:58 2010 +0000
@@ -986,14 +986,14 @@
 
     /* update flags */
     if(is_intra_only(st->codec))
-        pkt->flags |= PKT_FLAG_KEY;
+        pkt->flags |= AV_PKT_FLAG_KEY;
     else if (pc) {
         pkt->flags = 0;
         /* keyframe computation */
         if (pc->key_frame == 1)
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
         else if (pc->key_frame == -1 && pc->pict_type == FF_I_TYPE)
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
     }
     if (pc)
         pkt->convergence_duration = pc->convergence_duration;
@@ -1018,7 +1018,7 @@
                 compute_pkt_fields(s, st, NULL, pkt);
                 s->cur_st = NULL;
                 if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&
-                    (pkt->flags & PKT_FLAG_KEY) && pkt->dts != AV_NOPTS_VALUE) {
+                    (pkt->flags & AV_PKT_FLAG_KEY) && pkt->dts != AV_NOPTS_VALUE) {
                     ff_reduce_index(s, st->index);
                     av_add_index_entry(st, pkt->pos, pkt->dts, 0, 0, AVINDEX_KEYFRAME);
                 }
@@ -1045,7 +1045,7 @@
                     pkt->destruct = NULL;
                     compute_pkt_fields(s, st, st->parser, pkt);
 
-                    if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & PKT_FLAG_KEY){
+                    if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & AV_PKT_FLAG_KEY){
                         ff_reduce_index(s, st->index);
                         av_add_index_entry(st, st->parser->frame_offset, pkt->dts,
                                            0, 0, AVINDEX_KEYFRAME);
@@ -1621,7 +1621,7 @@
                 break;
             av_free_packet(&pkt);
             if(stream_index == pkt.stream_index){
-                if((pkt.flags & PKT_FLAG_KEY) && pkt.dts > timestamp)
+                if((pkt.flags & AV_PKT_FLAG_KEY) && pkt.dts > timestamp)
                     break;
             }
         }
@@ -3381,7 +3381,7 @@
 #undef fprintf
 #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
     PRINT("stream #%d:\n", pkt->stream_index);
-    PRINT("  keyframe=%d\n", ((pkt->flags & PKT_FLAG_KEY) != 0));
+    PRINT("  keyframe=%d\n", ((pkt->flags & AV_PKT_FLAG_KEY) != 0));
     PRINT("  duration=%0.3f\n", (double)pkt->duration / AV_TIME_BASE);
     /* DTS is _always_ valid after av_read_frame() */
     PRINT("  dts=");
--- a/vc1test.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/vc1test.c	Wed Mar 31 12:29:58 2010 +0000
@@ -103,7 +103,7 @@
         return AVERROR(EIO);
     if(s->streams[0]->time_base.den == 1000)
         pkt->pts = pts;
-    pkt->flags |= keyframe ? PKT_FLAG_KEY : 0;
+    pkt->flags |= keyframe ? AV_PKT_FLAG_KEY : 0;
     pkt->pos -= 8;
 
     return pkt->size;
--- a/vc1testenc.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/vc1testenc.c	Wed Mar 31 12:29:58 2010 +0000
@@ -58,7 +58,7 @@
 
     if (!pkt->size)
         return 0;
-    put_le32(pb, pkt->size | ((pkt->flags & PKT_FLAG_KEY) ? 0x80000000 : 0));
+    put_le32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
     put_le32(pb, pkt->pts);
     put_buffer(pb, pkt->data, pkt->size);
     put_flush_packet(pb);
--- a/yop.c	Wed Mar 31 10:45:15 2010 +0000
+++ b/yop.c	Wed Mar 31 12:29:58 2010 +0000
@@ -127,7 +127,7 @@
         yop->video_packet.data =  NULL;
         yop->video_packet.size =  0;
         pkt->data[0]           =  yop->odd_frame;
-        pkt->flags             |= PKT_FLAG_KEY;
+        pkt->flags             |= AV_PKT_FLAG_KEY;
         yop->odd_frame         ^= 1;
         return pkt->size;
     }