[FFmpeg-cvslog] avcodec/aasc: Fix indention
Michael Niedermayer
git at videolan.org
Thu Sep 1 18:14:51 EEST 2022
ffmpeg | branch: release/5.0 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun 18 20:54:36 2022 +0200| [ab936ed53e1c8e57a26b9ffff0ed07dfa438f086] | committer: Michael Niedermayer
avcodec/aasc: Fix indention
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit af2ed09220fe82e0aa479d1b93be6aadc4930efc)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab936ed53e1c8e57a26b9ffff0ed07dfa438f086
---
libavcodec/aasc.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 2177aa8f56..79612ce815 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -104,26 +104,26 @@ static int aasc_decode_frame(AVCodecContext *avctx,
ff_msrle_decode(avctx, s->frame, 8, &s->gb);
break;
case MKTAG('A', 'A', 'S', 'C'):
- switch (compr) {
- case 0:
- stride = (avctx->width * psize + psize) & ~psize;
- if (buf_size < stride * avctx->height)
+ switch (compr) {
+ case 0:
+ stride = (avctx->width * psize + psize) & ~psize;
+ if (buf_size < stride * avctx->height)
+ return AVERROR_INVALIDDATA;
+ for (i = avctx->height - 1; i >= 0; i--) {
+ memcpy(s->frame->data[0] + i * s->frame->linesize[0], buf, avctx->width * psize);
+ buf += stride;
+ buf_size -= stride;
+ }
+ break;
+ case 1:
+ bytestream2_init(&s->gb, buf, buf_size);
+ ff_msrle_decode(avctx, s->frame, 8, &s->gb);
+ break;
+ default:
+ av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr);
return AVERROR_INVALIDDATA;
- for (i = avctx->height - 1; i >= 0; i--) {
- memcpy(s->frame->data[0] + i * s->frame->linesize[0], buf, avctx->width * psize);
- buf += stride;
- buf_size -= stride;
}
break;
- case 1:
- bytestream2_init(&s->gb, buf, buf_size);
- ff_msrle_decode(avctx, s->frame, 8, &s->gb);
- break;
- default:
- av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr);
- return AVERROR_INVALIDDATA;
- }
- break;
default:
av_log(avctx, AV_LOG_ERROR, "Unknown FourCC: %X\n", avctx->codec_tag);
return -1;
More information about the ffmpeg-cvslog
mailing list