Le jour de la Récompense, an CCXXII, Clément Bœsch a écrit : > So I did that and pushed that part of the patchset, adjusted to use a > bprint helper. > > Unfortunately, this raises a warning because av_bprint_is_complete() > doesn't take a const parameter. I was too lazy to actually fix the API, > but didn't want to cast to hide the warning. If you can send a patch to > fix the bprint API that would be really appreciated. Thanks :)
Pushed the attached patch to my tree: Michael can pull if no objection. But you could have not needed it and make the whole set even simpler if you had added av_bprint_finalize() to the helper itself. Even better, "*got_sub = sub->num_rects > 0" could have been factored too. Regards, -- Nicolas George
From c0394614bacb38a3a303e80b246a76f37a28b391 Mon Sep 17 00:00:00 2001 From: Nicolas George <geo...@nsup.org> Date: Sun, 21 Sep 2014 19:03:33 +0200 Subject: [PATCH] lavu/bprint: add const to av_bprint_is_complete() argument. Signed-off-by: Nicolas George <geo...@nsup.org> --- libavutil/bprint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/bprint.h b/libavutil/bprint.h index 839ec1e..d1682fc 100644 --- a/libavutil/bprint.h +++ b/libavutil/bprint.h @@ -179,7 +179,7 @@ void av_bprint_clear(AVBPrint *buf); * It may have been truncated due to a memory allocation failure * or the size_max limit (compare size and size_max if necessary). */ -static inline int av_bprint_is_complete(AVBPrint *buf) +static inline int av_bprint_is_complete(const AVBPrint *buf) { return buf->len < buf->size; } -- 2.1.0
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel