On Mon, 27 Apr 2015 09:58:58 +0530 Niklesh Lalwani <niklesh.lalw...@iitb.ac.in> wrote:
> From: Niklesh <niklesh.lalw...@iitb.ac.in> > > Signed-off-by: Niklesh <niklesh.lalw...@iitb.ac.in> > --- > libavcodec/movtextdec.c | 54 > +++++++++++++++++++++++++------------------------ > 1 file changed, 28 insertions(+), 26 deletions(-) > > diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c > index 3059599..b134ac5 100644 > --- a/libavcodec/movtextdec.c > +++ b/libavcodec/movtextdec.c > - int *style_pos; > + int flag, style_pos; > - style_pos = av_malloc(4); > - *style_pos = AV_RB16(tsmb); > + style_pos = AV_RB16(tsmb); > index = i; > - av_dynarray_add(&style_start, &index, style_pos); > + av_dynarray_add(&style_start, &index, > (void*)(size_t)style_pos); This looks hacky. av_dynarray_add() is supposed to many an array of pointers, and here you twist it enough to reinterpret-cast an int to a pointer. I think av_dynarray2_add() might be the correct function to use here. Then your array can actually be an array of ints. (These dynarray functions are really a mess...) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel