# HG changeset patch # User michael # Date 1098409877 0 # Node ID d82ccc7cff1caacbfb2aaf5bcd459c45d55e33eb # Parent aca10aa7686fc33003ce55008928d2950b584e99 set keyframe flag at a more central place instead of in every demuxer for containers which only store intra only streams diff -r aca10aa7686f -r d82ccc7cff1c au.c --- a/au.c Tue Oct 19 10:37:02 2004 +0000 +++ b/au.c Fri Oct 22 01:51:17 2004 +0000 @@ -164,7 +164,6 @@ if (av_new_packet(pkt, MAX_SIZE)) return AVERROR_IO; pkt->stream_index = 0; - pkt->flags |= PKT_FLAG_KEY; ret = get_buffer(&s->pb, pkt->data, pkt->size); if (ret < 0) diff -r aca10aa7686f -r d82ccc7cff1c utils.c --- a/utils.c Tue Oct 19 10:37:02 2004 +0000 +++ b/utils.c Fri Oct 22 01:51:17 2004 +0000 @@ -591,6 +591,27 @@ } } +static int is_intra_only(AVCodecContext *enc){ + if(enc->codec_type == CODEC_TYPE_AUDIO){ + return 1; + }else if(enc->codec_type == CODEC_TYPE_VIDEO){ + switch(enc->codec_id){ + case CODEC_ID_MJPEG: + case CODEC_ID_MJPEGB: + case CODEC_ID_LJPEG: + case CODEC_ID_RAWVIDEO: + case CODEC_ID_DVVIDEO: + case CODEC_ID_HUFFYUV: + case CODEC_ID_ASV1: + case CODEC_ID_ASV2: + case CODEC_ID_VCR1: + return 1; + default: break; + } + } + return 0; +} + static int64_t lsb2full(int64_t lsb, int64_t last_ts, int lsb_bits){ int64_t mask = lsb_bits < 64 ? (1LL<codec)) + pkt->flags |= PKT_FLAG_KEY; + /* do we have a video B frame ? */ presentation_delayed = 0; if (st->codec.codec_type == CODEC_TYPE_VIDEO) { diff -r aca10aa7686f -r d82ccc7cff1c wav.c --- a/wav.c Tue Oct 19 10:37:02 2004 +0000 +++ b/wav.c Fri Oct 22 01:51:17 2004 +0000 @@ -331,7 +331,6 @@ if (av_new_packet(pkt, size)) return AVERROR_IO; pkt->stream_index = 0; - pkt->flags |= PKT_FLAG_KEY; ret = get_buffer(&s->pb, pkt->data, pkt->size); if (ret < 0)