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:
@@ -460,10 +460,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
|
||||
}
|
||||
|
||||
frame->nb_samples = ctx->max_frame_size;
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Me fail get_buffer()? That's unpossible!\n");
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
samples0 = (int16_t *)frame->data[0];
|
||||
samples1 = (int16_t *)frame->data[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user