Commit f2058af5 authored by heydowns's avatar heydowns

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



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10850 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0f42d835
...@@ -647,9 +647,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -647,9 +647,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
pkt->dts += offset; pkt->dts += offset;
} }
if(is_intra_only(st->codec))
pkt->flags |= PKT_FLAG_KEY;
/* do we have a video B frame ? */ /* do we have a video B frame ? */
delay= st->codec->has_b_frames; delay= st->codec->has_b_frames;
presentation_delayed = 0; presentation_delayed = 0;
...@@ -726,7 +723,9 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -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); // 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 */ /* update flags */
if (pc) { if(is_intra_only(st->codec))
pkt->flags |= PKT_FLAG_KEY;
else if (pc) {
pkt->flags = 0; pkt->flags = 0;
/* key frame computation */ /* key frame computation */
if (pc->pict_type == FF_I_TYPE) if (pc->pict_type == FF_I_TYPE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment