On Tue, 23 Jun 2015 11:14:36 +0530 Niklesh Lalwani <niklesh.lalw...@iitb.ac.in> wrote:
> On 6/23/15, Philip Langdale <phil...@overt.org> wrote: > > I got a bunch of warnings when I compiled it. Please fix. > > > > Thanks. > > > > ---------------------------------------------------------- > > > > CC libavcodec/movtextenc.o > > libavcodec/movtextenc.c: In function ‘mov_text_style_cb’: > > libavcodec/movtextenc.c:124:17: warning: ‘return’ with a value, in > > function returning void return AVERROR(ENOMEM); > > ^ > > libavcodec/movtextenc.c:138:21: warning: ‘return’ with a value, in > > function returning void return AVERROR(ENOMEM); > > ^ > > libavcodec/movtextenc.c:167:13: warning: ‘return’ with a value, in > > function returning void return AVERROR(ENOMEM); > > The function mov_text_style_cb() is a void function, I'll make it int > funciton to return a value. The function signature is fixed by the ASS callback struct - you can't change it. That means that it has to stay void. I guess you'll need to find a way to handle the allocation failures internally. I would suggest that means dropping styles if you can't allocate for them. Which is fine. If the user gets into this situation, they can't expect things to magically work. > > As for these warnings, we discussed that they were fine as long as I > am keeping check of alignment and placement into the buffer properly. > Defining all these variables as char* would make the code lengthier > and less clean. What do you suggest? Fair. Keep it as is for now. Thanks, --phil _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel