[FFmpeg-devel] GSOC update on the CDXL demuxer
Wed Apr 15 11:58:06 CEST 2009
On Tue, Apr 14, 2009 at 08:07:54PM +0200, Reimar D?ffinger wrote:
> On Tue, Apr 14, 2009 at 11:39:59AM -0500, Erion Omeri wrote:
> > /** If stereao, the actually sound size is half **/
> > if( 2 == s->streams[CDXL_AUDIO_STREAM_ID]->codec->channels )
> > cdxl->AudioFrameCount += ( cdxl->RawSoundSize / 2 );
> > else
> > cdxl->AudioFrameCount += cdxl->RawSoundSize;
> A simpler way to write it would be
> > cdxl->AudioFrameCount += cdxl->RawSoundSize / s->streams[CDXL_AUDIO_STREAM_ID]->codec->channels
> it's still quite ugly though, I'd suggest storing the channel count
> somewhere in CDXLContext to make it less ugly.
Another minor comment: I think FFmpeg should be able to calculate the
pts by itself just fine, so I'd suggest not setting it at all...
Not only would that simplify the code, it, too, should work
easier/better with seeking (once you add support for it).
More information about the ffmpeg-devel