diff mbox series

[FFmpeg-devel,04/18] lavc/dvdec: drop the only use of DVVideoContext.avctx

Message ID 20220824084318.333-4-anton@khirnov.net
State Accepted
Commit b62d41df07c627a677c69da139fd7e3710495a3a
Headers show
Series [FFmpeg-devel,01/18] tests/fate/mov: add a test for dv audio demuxed through dv demuxer | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed

Commit Message

Anton Khirnov Aug. 24, 2022, 8:43 a.m. UTC
The function gets the codec context parameter directly.
---
 libavcodec/dvdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Aug. 24, 2022, 12:24 p.m. UTC | #1
Anton Khirnov:
> The function gets the codec context parameter directly.
> ---
>  libavcodec/dvdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
> index f7423580aa..bad8419925 100644
> --- a/libavcodec/dvdec.c
> +++ b/libavcodec/dvdec.c
> @@ -393,7 +393,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
>      LOCAL_ALIGNED_16(int16_t, sblock, [5 * DV_MAX_BPM], [64]);
>      LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [80     + AV_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
>      LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [80 * 5 + AV_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
> -    const int log2_blocksize = 3-s->avctx->lowres;
> +    const int log2_blocksize = 3 - avctx->lowres;
>      int is_field_mode[5];
>      int vs_bit_buffer_damaged = 0;
>      int mb_bit_buffer_damaged[5] = {0};

LGTM.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index f7423580aa..bad8419925 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -393,7 +393,7 @@  static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
     LOCAL_ALIGNED_16(int16_t, sblock, [5 * DV_MAX_BPM], [64]);
     LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [80     + AV_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
     LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [80 * 5 + AV_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
-    const int log2_blocksize = 3-s->avctx->lowres;
+    const int log2_blocksize = 3 - avctx->lowres;
     int is_field_mode[5];
     int vs_bit_buffer_damaged = 0;
     int mb_bit_buffer_damaged[5] = {0};