diff mbox series

[FFmpeg-devel,3/7] avcodec/h261dec: Don't set write-only picture_number

Message ID AS8P250MB07444613A5E85C0BEF96C3728FC8A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit c995311bcfdab5ed3e2bb5bfbbca3fac98bec70d
Headers show
Series [FFmpeg-devel,1/7] avcodec/wmv2dec: Parse extradata during init | expand

Commit Message

Andreas Rheinhardt Oct. 7, 2023, 12:40 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/h261dec.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Andreas Rheinhardt Oct. 11, 2023, 7:48 p.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/h261dec.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
> index a4e0bf9cf2..91d555a70e 100644
> --- a/libavcodec/h261dec.c
> +++ b/libavcodec/h261dec.c
> @@ -512,10 +512,7 @@ static int h261_decode_picture_header(H261DecContext *h)
>      }
>  
>      /* temporal reference */
> -    i = get_bits(&s->gb, 5); /* picture timestamp */
> -    if (i < (s->picture_number & 31))
> -        i += 32;
> -    s->picture_number = (s->picture_number & ~31) + i;
> +    skip_bits(&s->gb, 5); /* picture timestamp */
>  
>      s->avctx->framerate = (AVRational) { 30000, 1001 };
>  

Will apply patches #3, #7 and #8 of this patchset.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index a4e0bf9cf2..91d555a70e 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -512,10 +512,7 @@  static int h261_decode_picture_header(H261DecContext *h)
     }
 
     /* temporal reference */
-    i = get_bits(&s->gb, 5); /* picture timestamp */
-    if (i < (s->picture_number & 31))
-        i += 32;
-    s->picture_number = (s->picture_number & ~31) + i;
+    skip_bits(&s->gb, 5); /* picture timestamp */
 
     s->avctx->framerate = (AVRational) { 30000, 1001 };