Fallback to input timestamps for non-delay encoders.

Causes FFmpeg to pass through the correct pts values,
instead of clobbering all to AV_NOPTS_VALUE (the av_init_packet
default) to then make up new ones based on only fps when muxing.
Included are also the related FATE ref changes, which all
some reasonable on quick investigation.
Also set all H.264 references to us -vsync drop to reduce the
diff for the ref files.
Otherwise almost all H.264 references need to change, mostly due
to now starting with negative pts values.
About 20 additional H.264 conformance tests needed -vsync
drop anyway because they create pts values that are out of
order and thus not possible to mux otherwise.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
Reimar Döffinger
2012-01-22 11:23:47 +01:00
parent 9719528e05
commit 05741d70c7
22 changed files with 1276 additions and 1274 deletions

View File

@@ -1562,6 +1562,8 @@ static void do_video_out(AVFormatContext *s,
if (ret > 0) {
pkt.data = bit_buffer;
pkt.size = ret;
if (!(enc->codec->capabilities & CODEC_CAP_DELAY))
pkt.pts = av_rescale_q(ost->sync_opts, enc->time_base, ost->st->time_base);
if (enc->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %"PRId64"/%"PRId64"\n",