Perhaps the modifications i have made in the decoder are usefull for you too. Have a look at this post: