[FFmpeg-devel] [PATCH] Lego Mindstorms RSO de/muxer (copied from au.c)

Måns Rullgård mans
Fri Jul 16 09:03:42 CEST 2010


Rafa?l Carr? <rafael.carre at gmail.com> writes:

> On Fri, 16 Jul 2010 05:22:46 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
>
>> On Thu, Jul 15, 2010 at 04:44:49PM +0200, Rafa?l Carr? wrote:
>> [...]
>> > + * You should have received a copy of the GNU Lesser General Public
>> > + * License along with FFmpeg; if not, write to the Free Software
>> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>> > 02110-1301 USA
>> > + */
>> > +
>> > +#include "libavutil/intreadwrite.h"
>> > +#include "avformat.h"
>> > +#include "raw.h"
>> > +#include "riff.h"
>> > +#include "rso.h"
>> > +
>> 
>> > +static int rso_probe(AVProbeData *p)
>> > +{
>> > +    uint16_t rate, loop;
>> 
>> why uint16_t?
>
> Those are 16 bits values, do you suggest using int instead?

There is very rarely any reason to use smaller types than int for
local variables.

>> > +    s->priv_data = NULL;
>> 
>> how did it become non null ?
>
> Dunno, I copied it straight from au.c and didn't check if it was needed.

So it's cargo cult, plain and simple.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list