in: net.sourceforge.jffmpeg.demux.mpg.MpegDemux:
I changed:
if ( tracks.size() == 0 ) {
to
if ( tracks.size() > 0 ) {
in this method
public Track[] getTracks() throws IOException,
BadHeaderException {
if ( tracks.size() > 0 ) {
MpegVideoTrack test = new MpegVideoTrack(
this, 0x1e0 );
test.readFrame( new Buffer() );
test.readFrame( new Buffer() );
test.readFrame( new Buffer() );
}
return (Track[])tracks.values().toArray( new Track
[0] );
}
because it would blow up with an NPE on the third 'test' -
the mpeg was a working simpsons video, so I am not
sure what the deal is. This somehow looks like test
code.
Thanks!
Ray
I just started working on demuxing MPEG2 for a cable
settop box simulator - I am not from the cable world...
Logged In: YES
user_id=76312
actually, this is the root cause - I changed this method
instead to better signal the root cause:
protected synchronized int peekPacket( long pos ) throws
IOException {
if (seek == null) throw new RuntimeException
("inputstream is not 'Seekable' stream=" + in.getClass
().getName());
Logged In: YES
user_id=76312
actually, this is the root cause - I changed this method
instead to better signal the root cause:
protected synchronized int peekPacket( long pos ) throws
IOException {
if (seek == null) throw new RuntimeException
("inputstream is not 'Seekable' stream=" + in.getClass
().getName());