[Red5devs] Ideas?

Steven Zimmer stevenlzimmer at gmail.com
Fri Jun 20 10:44:04 PDT 2008


I have a feeling I'm being ignored, but I'll try asking anyways. Does anyone
have any idea why on the mp4 branch the mp4 reader is having way less
samples than video chunks? It seems to be that they should be equal I'm not
sure what's going on here. This is what currently is causing the application
to crash. I will plug away at I though but any help that could be provided
would be much appreciated.

 

I believe the problem is in this section of code:

 

            while (records.hasMoreElements()) {

                  x++;

                  log.info("x: ",x);

                  MP4Atom.Record record = (MP4Atom.Record)
records.nextElement();

                  int firstChunk = record.getFirstChunk();

                  int sampleCount = record.getSamplesPerChunk();

                  //log.debug("First chunk: {} count:{}", firstChunk,
sampleCount);

                  pos = (Long) videoChunkOffsets.elementAt(firstChunk - 1);

                  while (sampleCount > 0) {

                        //log.debug("Position: {}", pos);

                  posTagMap.put(pos, sample);

                  samplePosMap.put(sample, pos);

                  //check to see if the sample is a keyframe

                  if (syncSamples.contains(sample)) {

                        //log.debug("Keyframe - sample: {}", sample);

                        positionList.add(pos);

                        //need to calculate ts

                        Integer ts = ((int) videoSampleDuration * (sample));

                        //log.debug("Keyframe - timestamp: {}", ts);

                        timestampList.add(ts);

                  }

                  pos = pos + (Integer) videoSamples.get(sample);

                  sampleCount--;

                  sample++;

                  }

            }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20080620/4295cfb4/attachment-0001.html 


More information about the Red5devs mailing list