lavc: factorize ff_{thread_,re,}get_buffer error messages.
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
This commit is contained in:
@@ -310,10 +310,8 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
|
||||
if (image->comps[i].prec > avctx->bits_per_raw_sample)
|
||||
avctx->bits_per_raw_sample = image->comps[i].prec;
|
||||
|
||||
if (ff_thread_get_buffer(avctx, &frame, 0) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "ff_thread_get_buffer() failed\n");
|
||||
if (ff_thread_get_buffer(avctx, &frame, 0) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
|
||||
ctx->dec_params.cp_reduce = avctx->lowres;
|
||||
|
||||
Reference in New Issue
Block a user