[FFmpeg-devel] [PATCH] lavc/mediacodecdec_h2645: fix nalu data_size type

wm4 nfxjfg at googlemail.com
Fri Sep 30 20:01:09 EEST 2016


On Fri, 30 Sep 2016 17:51:42 +0100
Josh de Kock <josh at itanimul.li> wrote:

> On 30/09/2016 17:34, Matthieu Bouron wrote:
> > From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
> >
> > ---
> >  libavcodec/mediacodecdec_h2645.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/mediacodecdec_h2645.c b/libavcodec/mediacodecdec_h2645.c
> > index 122be88..9f8110c 100644
> > --- a/libavcodec/mediacodecdec_h2645.c
> > +++ b/libavcodec/mediacodecdec_h2645.c
> > @@ -154,7 +154,7 @@ static int h264_set_extradata(AVCodecContext *avctx, FFAMediaFormat *format)
> >
> >      if (pps && sps) {
> >          uint8_t *data = NULL;
> > -        size_t data_size = 0;
> > +        int data_size = 0;
> >
> >          if ((ret = h2645_ps_to_nalu(sps->data, sps->data_size, &data, &data_size)) < 0) {
> >              goto done;
> >  
> 
> Shouldn't you change h2645_ps_to_nalu()'s size arguments to size_t as well?

FFmpeg uses int instead of size_t in a LOT of places (including API).
Might be a little bit too late to fix this convention.


More information about the ffmpeg-devel mailing list