mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 14:15:29 +01:00
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:
@@ -100,10 +100,8 @@ static int cpia_decode_frame(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
// Get buffer filled with previous frame
|
||||
if ((ret = ff_reget_buffer(avctx, frame)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed!\n");
|
||||
if ((ret = ff_reget_buffer(avctx, frame)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
for ( i = 0;
|
||||
|
||||
Reference in New Issue
Block a user