diff options
author | Jeff Downs <heydowns@borg.com> | 2007-10-24 04:54:44 +0000 |
---|---|---|
committer | Jeff Downs <heydowns@borg.com> | 2007-10-24 04:54:44 +0000 |
commit | 3a1d35882518300aac29aa621071b6dbe021560a (patch) | |
tree | e93d4ed769205fdddfc9de67161ddc12d6e82500 /libavformat/utils.c | |
parent | c198955252b181637581cf294782547141fcd560 (diff) | |
download | ffmpeg-3a1d35882518300aac29aa621071b6dbe021560a.tar.gz |
Move setting of key frame flag for intra-only codecs, ignoring key frame
flag of parser for such codecs as intra-only parsers don't set key frame
flag. Corrects lack of key frame marking in mjpeg, possibly others.
Original thread: Key Frame Marking, Fri, 12 Oct 2007 03:35:57
Originally committed as revision 10850 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 3b8c2643c8..fe967cbc84 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -647,9 +647,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, pkt->dts += offset; } - if(is_intra_only(st->codec)) - pkt->flags |= PKT_FLAG_KEY; - /* do we have a video B frame ? */ delay= st->codec->has_b_frames; presentation_delayed = 0; @@ -726,7 +723,9 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, // av_log(NULL, AV_LOG_ERROR, "OUTdelayed:%d/%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n", presentation_delayed, delay, pkt->pts, pkt->dts, st->cur_dts); /* update flags */ - if (pc) { + if(is_intra_only(st->codec)) + pkt->flags |= PKT_FLAG_KEY; + else if (pc) { pkt->flags = 0; /* key frame computation */ if (pc->pict_type == FF_I_TYPE) |