[FFmpeg-cvslog] avcodec/mss2: Provide non NULL context to av_log()
Michael Niedermayer
git at videolan.org
Wed Jan 2 01:24:28 EET 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Dec 31 21:32:37 2018 +0100| [9446c5887f99d1e02b836e7e134b833e591ca62b] | committer: Michael Niedermayer
avcodec/mss2: Provide non NULL context to av_log()
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9446c5887f99d1e02b836e7e134b833e591ca62b
---
libavcodec/mss2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index 3180af1d60..2eb366ee78 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -174,7 +174,7 @@ static int decode_pal_v2(MSS12Context *ctx, const uint8_t *buf, int buf_size)
return 1 + ncol * 3;
}
-static int decode_555(GetByteContext *gB, uint16_t *dst, ptrdiff_t stride,
+static int decode_555(AVCodecContext *avctx, GetByteContext *gB, uint16_t *dst, ptrdiff_t stride,
int keyframe, int w, int h)
{
int last_symbol = 0, repeat = 0, prev_avail = 0;
@@ -212,7 +212,7 @@ static int decode_555(GetByteContext *gB, uint16_t *dst, ptrdiff_t stride,
repeat = 0;
while (b-- > 130) {
if (repeat >= (INT_MAX >> 8) - 1) {
- av_log(NULL, AV_LOG_ERROR, "repeat overflow\n");
+ av_log(avctx, AV_LOG_ERROR, "repeat overflow\n");
return AVERROR_INVALIDDATA;
}
repeat = (repeat << 8) + bytestream2_get_byte(gB) + 1;
@@ -634,7 +634,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (is_555) {
bytestream2_init(&gB, buf, buf_size);
- if (decode_555(&gB, (uint16_t *)c->rgb_pic, c->rgb_stride >> 1,
+ if (decode_555(avctx, &gB, (uint16_t *)c->rgb_pic, c->rgb_stride >> 1,
keyframe, avctx->width, avctx->height))
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list