On 9/8/11 2:52 PM, Luca Barbato wrote:
On 9/8/11 11:58 AM, [email protected] wrote:
From: Aviad Rozenhek<[email protected]>

---
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.

--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
>From e3b9131b3f2e44ffa38afd37df5a24a77b511541 Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <[email protected]>
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;
-- 
1.7.5.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to