On 9/8/11 8:41 PM, Georgi Chorbadzhiyski wrote:
On 9/8/11 2:52 PM, Luca Barbato wrote:
On 9/8/11 11:58 AM, avia...@gmail.com wrote:
From: Aviad Rozenhek<avia...@gmail.com>

---
libavformat/mpegts.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 6ac7cd3..dac5903 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1293,7 +1293,7 @@ static int handle_packet(MpegTSContext *ts, const uint8_t 
*packet)

tss->last_cc = cc;
if (!cc_ok) {
- av_log(ts->stream, AV_LOG_WARNING, "Continuity Check Failed\n");
+ av_log(ts->stream, AV_LOG_WARNING, "Continuity Check Failed [pid=%d]\n", pid);
if(tss->type == MPEGTS_PES) {
PESContext *pc = tss->u.pes_filter.opaque;
pc->flags |= AV_PKT_FLAG_CORRUPT;

Seems ok.

The attached seems better.


0001-mpegts-When-reporting-continuity-error-show-pid-expe.patch


 From e3b9131b3f2e44ffa38afd37df5a24a77b511541 Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski<g...@unixsol.org>
Date: Thu, 8 Sep 2011 20:38:48 +0300
Subject: [PATCH] mpegts: When reporting continuity error show pid, expected
  and received cc.

---
  libavformat/mpegts.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index a723418..2bc8691 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1290,14 +1290,15 @@ static int handle_packet(MpegTSContext *ts, const 
uint8_t *packet)
              || tss->last_cc<  0
              || expected_cc == cc;

-    tss->last_cc = cc;
      if (!cc_ok) {
-        av_log(ts->stream, AV_LOG_WARNING, "Continuity Check Failed\n");
+        av_log(ts->stream, AV_LOG_WARNING, "Continuity check failed for pid %d 
expected %d got %d\n",
+            pid, expected_cc, cc);
          if(tss->type == MPEGTS_PES) {
              PESContext *pc = tss->u.pes_filter.opaque;
              pc->flags |= AV_PKT_FLAG_CORRUPT;
          }
      }
+    tss->last_cc = cc;

      if (!has_payload)
          return 0;

Umm, the tss->last_cc move is left over, sorry about that.

--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to