[PATCH] Print a warning when using wild guesses as time stamps.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 9e3f775..dcf773f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3282,6 +3282,11 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ //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){ + 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->pts= st->cur_dts; pkt->pts= st->pts.val; -- 1.7.8.3
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level but it LGTM otherwise [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad
On Sun, Jan 22, 2012 at 11:45:49PM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level
Not sure. I don't think so, I think it is mostly the RAW encoder and maybe some intra-only ones. Haven't really tested though. Bug considering that as far as I can tell the effect is totally broken timing with any and all variable frame-rate muxing I don't think DEBUG is really appropriate.
On Mon, Jan 23, 2012 at 12:09:49AM +0100, Reimar Döffinger wrote:
On Sun, Jan 22, 2012 at 11:45:49PM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level
Not sure. I don't think so, I think it is mostly the RAW encoder and maybe some intra-only ones. Haven't really tested though. Bug considering that as far as I can tell the effect is totally broken timing with any and all variable frame-rate muxing I don't think DEBUG is really appropriate.
how can i reproduce the bug ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator
On 23 Jan 2012, at 01:11, Michael Niedermayer <michaelni@gmx.at> wrote:
On Mon, Jan 23, 2012 at 12:09:49AM +0100, Reimar Döffinger wrote:
On Sun, Jan 22, 2012 at 11:45:49PM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level
Not sure. I don't think so, I think it is mostly the RAW encoder and maybe some intra-only ones. Haven't really tested though. Bug considering that as far as I can tell the effect is totally broken timing with any and all variable frame-rate muxing I don't think DEBUG is really appropriate.
how can i reproduce the bug ?
Run the wmv8-drm fate test. Though I think others like the sierra-vmd (IIRC) are more obvious. I suspect using the same command but transcoding into nut with rawvideo will show the same behaviour.
On Sun, Jan 22, 2012 at 11:45:49PM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level
but it LGTM otherwise
ping [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA
On Mon, Mar 19, 2012 at 03:57:18AM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 11:45:49PM +0100, Michael Niedermayer wrote:
On Sun, Jan 22, 2012 at 02:12:45PM +0100, Reimar Döffinger wrote:
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> --- libavformat/utils.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
if this is printed with many files then DEBUG is likely a better level
but it LGTM otherwise
ping
I pushed it. My impression is that it should rarely be an annoyance, but if someone complains we can still change the level.
participants (2)
-
Michael Niedermayer -
Reimar Döffinger