[FFmpeg-cvslog] r10850 - trunk/libavformat/utils.c
heydowns
subversion
Wed Oct 24 06:54:44 CEST 2007
Author: heydowns
Date: Wed Oct 24 06:54:44 2007
New Revision: 10850
Log:
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
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c (original)
+++ trunk/libavformat/utils.c Wed Oct 24 06:54:44 2007
@@ -647,9 +647,6 @@ static void compute_pkt_fields(AVFormatC
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(AVFormatC
// 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)
More information about the ffmpeg-cvslog
mailing list