[FFmpeg-devel] [PATCH] nellymoserdec: Allow using unusual input block sizes

Martin Storsjö martin
Mon Jun 14 15:08:59 CEST 2010


On Mon, 14 Jun 2010, Michael Niedermayer wrote:

> On Mon, Jun 14, 2010 at 02:27:20PM +0300, Martin Storsj? wrote:
> > 
> > diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
> > index 82a3f07..cda8d11 100644
> > --- a/libavcodec/nellymoserdec.c
> > +++ b/libavcodec/nellymoserdec.c
> > @@ -178,8 +178,12 @@ static int decode_tag(AVCodecContext * avctx,
> >          case 512:   // 44100Hz
> >              blocks = 8; break;
> >          default:
> > +            if (buf_size % 64) {
> >              av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
> >              return buf_size;
> > +            }
> > +            blocks = buf_size / 64;
> > +            break;
> >      }
> 
> the switch/case is unneeed

Hmm, yes, the whole switch could be removed now. Are you ok with that, 
Benjamin? If the original comments about fixed block numbers for different 
bit rates serves any purpose still, they perhaps should be retained in 
some form.

// Martin



More information about the ffmpeg-devel mailing list