Hi guys
I've noticed that under some circumstances the '->|' and '|<-' buttons cause
dvbcut to hang, using 100% cpu.
e.g.
1) select a position at EOF or a few frames before EOF. Press '|<-'.
2) in some circumstances close to start of file (? sorry, cant replicate at the
moment), Press '->|'.
The fault lies in mpgfile.cpp, mpgfile::playaudio
I believe Case 1 is caused by a 'continue' when pts==(pts_t)AV_NOPTS_VALUE,
when you should instead 'break'.
At the bottom of this message you will find a patch which cures the problem: it
now emits an error message and abandons trying to play the segment. It may be
possible to play some shorter segment of the audio, (whatever is available
close to EOF) but that change is beyond my current understanding of the code
(which is approx == 0!)
This may also cure case (2) but I can't prove that at the moment.
Incidentally, next time anyone feels like doing a bulk update to the code, can
I make a plea for '$Id' identifiers (or whatever the cvs equivalent is) in all
sources?
Regards,
Brian
Patch follows:
*** mpgfile.cpp 2006/07/21 07:17:44 1.2
--- mpgfile.cpp 2006/07/21 09:15:22 1.3
***************
*** 287,293 ****
break;
}
if (pts==(pts_t)AV_NOPTS_VALUE)
! continue;
if (pts<=startpts)
sd->pop(pop);
if (pts>=startpts)
--- 287,300 ----
break;
}
if (pts==(pts_t)AV_NOPTS_VALUE)
! {
! // fix to avoid endless loop when trying to play a segment
! // close to the end of the file.
! // TODO: play whatever small section might exist
! // instead of aborting completely?
! fprintf(stderr, "cant play this segment (AV_NOPTS_VALUE)\n");
! break;
! }
if (pts<=startpts)
sd->pop(pop);
if (pts>=startpts)
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com
Powered by Outblaze
-------------------------------------------------------------------------
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