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

Rafaël Carré rafael.carre
Sun Jul 18 17:37:13 CEST 2010


On Fri, 16 Jul 2010 22:52:14 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> On Fri, Jul 16, 2010 at 04:07:55PM +0200, Rafa?l Carr? wrote:
> > On Fri, 16 Jul 2010 15:59:11 +0200
> > Rafa?l Carr? <rafael.carre at gmail.com> wrote:
> > 
> > > 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:
> > > 
> > > > > +    st->duration = size << 3 / bpp;
> > > > 
> > > > is this correct?
> > > 
> > > changed variable name to bps and use >> av_log2(bps)
> > > it doesn't make it more correct or less correct, but it's still
> 
> st->duration = size << (3 / bpp);
> was correct?

Oops no it wasn't. (<< 3) >> 3 gave the same result than << (3/8) so I
didn't notice it in ffmpeg output

Changed size to unsigned and use * 8 for readability

> missing regtest

added


> > +++ b/libavformat/rso.h

> > +/* The ffmpeg codecs we support, and the IDs they have in the file
> > */ +static const AVCodecTag codec_rso_tags[] = {
> > +    { CODEC_ID_PCM_U8,          0x0100 },
> > +    { CODEC_ID_ADPCM_IMA_WAV,   0x0101 },
> > +    { CODEC_ID_NONE, 0 },
> > +};
> 
> duplicated 

Moved to rso.c

Although I preferred the muxer and demuxer in one .c file , the code is
small enough to fit in one file


Also:
- Include "internal.h" to get AVCodecTag typedef
- Change AVERROR(EINVAL) to AVERROR_INVALIDDATA
- Cosmetics in rso_read_header() (alignement)

-- 
? Rafa?l Carr? ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Lego-Mindstorms-RSO-de-muxer-copied-from-au.c.patch
Type: text/x-patch
Size: 14045 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100718/c8fb5ef1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100718/c8fb5ef1/attachment.pgp>



More information about the ffmpeg-devel mailing list