Hi,

Am I really the only one who suffers from this problem?
At least on my machine the crude little patch that I attached is enough
to process damaged mpeg files that would otherwise take more than an
hour within the usual time.

Of course it might be advantageous to somehow count the warnings per
instance (i.e. per contiguous file segment) and display a summary,
to indicate some measure of how problematic an input file is, but
IMHO pretty much anything is better than just spill thousands of
warnings ...

Regards,
                           Peter

On 2009-03-29, I had written:

I am not sure, what would be the best way to do it, but I really think
there ought to be some way to suppress these warnings; at least I personally
don't even know, what exactly the warning is about; whatever it is, there
probably isn't anything a user could do about it ...

Usually, whenever I get these messages, there seems to be a message for every
single frame, which means that dvbcut will spend at least 95% of the time
just printing error messages, so I guess the easiest way to fix this would
be to just use a counter and print at most 100 (or whatever) of these warnings
(or 1 single message with the total count at the end) ...

Index: src/mpegmuxer.cpp
===================================================================
--- src/mpegmuxer.cpp	(revision 166)
+++ src/mpegmuxer.cpp	(working copy)
@@ -76,6 +76,8 @@
   }
 __attribute__((packed));
 
+static unsigned int getbuffree_count=0;
+#define MAX_GETBUFFREE_WARN 100
 
 // **************************************************************************
 // ***  mpegmuxer
@@ -357,12 +359,12 @@
 
     p->setscr(scr);
     scr+=packsize?scrpack:int(27.e6/double(muxrate*50)*p->getsize()+0.9999);
-    if (scr>p->getmaxscr())
-      fprintf(stderr,"Muxer problem: %s > %s (dts:%s) s->getbuffree():%d\n",
-              ptsstring(scr2pts(scr)).c_str(),
-              ptsstring(scr2pts(p->getmaxscr())).c_str(),
-              ptsstring(p->getdts()).c_str(),
-              s->getbuffree() );
+    if (scr>p->getmaxscr() && (getbuffree_count++ < MAX_GETBUFFREE_WARN))
+	fprintf(stderr,"Muxer problem: %s > %s (dts:%s) s->getbuffree():%d\n",
+		ptsstring(scr2pts(scr)).c_str(),
+		ptsstring(scr2pts(p->getmaxscr())).c_str(),
+		ptsstring(p->getdts()).c_str(),
+		s->getbuffree() );
     if (!p->write(fd)) return false;
     if (p->getaupayloadlen()>0) {
       s->fill(p->getaupayloadlen());
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
DVBCUT-user mailing list
DVBCUT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to