Merge commit '5d983fdbca5570a1545a892583a372cfb3fffe92'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Apr 2014 19:34:30 +0000 (21:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Apr 2014 19:37:26 +0000 (21:37 +0200)
* commit '5d983fdbca5570a1545a892583a372cfb3fffe92':
  flv: Warn only once

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/flvdec.c

@@@ -934,14 -896,10 +934,15 @@@ retry_duration
              // sign extension
              int32_t cts = (avio_rb24(s->pb) + 0xff800000) ^ 0xff800000;
              pts = dts + cts;
-             if (cts < 0) { // dts are wrong
 -            if (cts < 0 && !flv->wrong_dts) { // dts might be wrong
++            if (cts < 0) { // dts might be wrong
++                if (!flv->wrong_dts)
++                    av_log(s, AV_LOG_WARNING,
++                        "Negative cts, previous timestamps might be wrong.\n");
                  flv->wrong_dts = 1;
-                 av_log(s, AV_LOG_WARNING,
-                        "Negative cts, previous timestamps might be wrong.\n");
 +            } else if (FFABS(dts - pts) > 1000*60*15) {
                  av_log(s, AV_LOG_WARNING,
 -                       "Negative cts, previous timestamps might be wrong.\n");
 +                       "invalid timestamps %"PRId64" %"PRId64"\n", dts, pts);
 +                dts = pts = AV_NOPTS_VALUE;
              }
              if (flv->wrong_dts)
                  dts = AV_NOPTS_VALUE;