mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
Print a warning when using wild guesses as time stamps.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
89411ae699
commit
2a4f1d38d9
@ -3227,6 +3227,11 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){
|
|||||||
|
|
||||||
//XXX/FIXME this is a temporary hack until all encoders output pts
|
//XXX/FIXME this is a temporary hack until all encoders output pts
|
||||||
if((pkt->pts == 0 || pkt->pts == AV_NOPTS_VALUE) && pkt->dts == AV_NOPTS_VALUE && !delay){
|
if((pkt->pts == 0 || pkt->pts == AV_NOPTS_VALUE) && pkt->dts == AV_NOPTS_VALUE && !delay){
|
||||||
|
static int warned;
|
||||||
|
if (!warned) {
|
||||||
|
av_log(s, AV_LOG_WARNING, "Encoder did not produce proper pts, making some up.\n");
|
||||||
|
warned = 1;
|
||||||
|
}
|
||||||
pkt->dts=
|
pkt->dts=
|
||||||
// pkt->pts= st->cur_dts;
|
// pkt->pts= st->cur_dts;
|
||||||
pkt->pts= st->pts.val;
|
pkt->pts= st->pts.val;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user