On Fri, 11 Oct 2013 19:11:16 +0200, Maxim Polijakowski <[email protected]> wrote: > Am 11.10.2013 13:02, schrieb Anton Khirnov: > > [...] > > + > > + *got_frame_ptr = 1; > > + > > + return avctx->block_align; > > Returning block_align here seems a bit weird, when i don't see it used at > > all in > > any other place. > > > > What should be returned instead? Both atrac1.c and atrac3.c do the same. > Even wmadec.c contains the same code... >
If you don't want to be fancy and support multiple frames per packet, it should return the packet size. >From a quick look, atrac3.c uses block_align in multiple places and actually checks that it is set properly. Your decoder does not use it at all from what i can see and requires the caller to set it. This might work with the oma demuxer in lavf, but can break horribly if a different demuxer is used, or the caller does not use lavf at all. atrac1.c seems to be the same as your decoder, and should be fixed in the same way. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
