Hi!
A Anopheles wrote:
> in mpgfile.cpp
>
> I've discovered that AV_NOPTS_VALUE can occur at least once without causing
> any harm,
> and will do routinely in files created by dvbcut using DVD (DVBCUT
> multiplexer)
>
> I've added a 'safety counter' so that abort from the loop happens only when a
> limit number of AV_NOPTS_VALUE occurs. (I've set the limit at 100 but it
> might be ok at 1)
>
> This appears to restore the function of '|<-' and '->|' while preventing the
> loop near EOF.
The problem is actually somewhere else: There are bad stop conditions in
two of the loops, so they sometimes run forever. See the attached patch
(my #5) for details.
For those of you who missed one or more of my patches I have uploaded
them to my homepage. See http://www.mr511.de/dvbcut/
--
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little
Index: dvbcut/src/mpgfile.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/mpgfile.cpp,v
retrieving revision 1.3
diff -u -r1.3 mpgfile.cpp
--- dvbcut/src/mpgfile.cpp 23 Jun 2006 12:14:02 -0000 1.3
+++ dvbcut/src/mpgfile.cpp 28 Jul 2006 21:10:41 -0000
@@ -264,7 +264,7 @@
streamdata
*sd=sh.newstream(audiostream(aud),s[audiostream(aud)].type,istransportstream());
while (sd->empty()) {
- if (sh.fileposition<stopreadpos && streamreader(sh)<=0)
+ if (sh.fileposition > stopreadpos || streamreader(sh)<=0)
return; // data does not reach the point in time from which we like to
start playing
while (!sd->empty() &&
!(sd->itemlist().begin()->headerhaspts()&&sd->itemlist().begin()->data_alignment_indicator()))
@@ -272,7 +272,7 @@
}
for(;;) {
- if (sh.fileposition<stopreadpos && streamreader(sh)<=0)
+ if (sh.fileposition > stopreadpos || streamreader(sh)<=0)
return; // data does not reach the point in time from which we like to
start playing
if (sd->empty())
continue;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user