Commit 3698a372 authored by michael's avatar michael

Move code setting delay and presentation_delayed a little up so

that the variables are available sooner.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15640 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 68f91409
......@@ -824,6 +824,15 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
int num, den, presentation_delayed, delay, i;
int64_t offset;
/* do we have a video B-frame ? */
delay= st->codec->has_b_frames;
presentation_delayed = 0;
/* XXX: need has_b_frame, but cannot get it if the codec is
not initialized */
if (delay &&
pc && pc->pict_type != FF_B_TYPE)
presentation_delayed = 1;
if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63
/*&& pkt->dts-(1LL<<st->pts_wrap_bits) < pkt->pts*/){
pkt->dts -= 1LL<<st->pts_wrap_bits;
......@@ -850,14 +859,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
pkt->dts += offset;
}
/* do we have a video B-frame ? */
delay= st->codec->has_b_frames;
presentation_delayed = 0;
/* XXX: need has_b_frame, but cannot get it if the codec is
not initialized */
if (delay &&
pc && pc->pict_type != FF_B_TYPE)
presentation_delayed = 1;
/* This may be redundant, but it should not hurt. */
if(pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts > pkt->dts)
presentation_delayed = 1;
......
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