[FFmpeg-devel] [PATCH] MLP/TrueHD decoder
Ian Caulfield
ian.caulfield
Wed Nov 14 10:06:20 CET 2007
Hi,
On Nov 14, 2007 2:19 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> i really dont like how the parser is implemented, not at all
> what about:
>
> if(!in_sync){
> search for sync code, if found set remaining_size to the PREVIOUS
> packet
> that is up to this sync code
> }else if(!remaining_size){
> set remaining_size based on header here
> }
> if(remaining_size){
> add whats available of remaining_size into our buffer and decrease
> remaining_size accordingly
> }else
> add everything we have into the buffer
> if(!remaining_size)
> return packet
>
> (and yes with needed parity checks where appropriate)
>
How would you suggest handling the case where the sync code is split across
two calls to the parser?
Ian
More information about the ffmpeg-devel
mailing list