[vlc-commits] [Git][videolan/vlc][master] 4 commits: codec: openapv: fix p_sys unset before calling CloseAPVDecoder()

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Sep 18 15:38:08 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
30aaab3e by Steve Lhomme at 2026-09-18T14:17:11+00:00
codec: openapv: fix p_sys unset before calling CloseAPVDecoder()

Fixes #30142

- - - - -
936db159 by Steve Lhomme at 2026-09-18T14:17:11+00:00
codec: openapv: release block on error or when it's decoded

Fixes #30141

- - - - -
9bf98361 by Steve Lhomme at 2026-09-18T14:17:11+00:00
build: require OpenAVP 0.3

See https://github.com/AcademySoftwareFoundation/openapv/pull/203

Ref. #30140

- - - - -
72af4be8 by Steve Lhomme at 2026-09-18T14:17:11+00:00
codec: openapv: fix bogus height reported to OpenAPV

The pitch is not involved in the picture height.

Ref. #30140

- - - - -


3 changed files:

- configure.ac
- modules/codec/meson.build
- modules/codec/openapv.c


Changes:

=====================================
configure.ac
=====================================
@@ -3206,7 +3206,7 @@ PKG_ENABLE_MODULES_VLC([DAALA], [], [daaladec daalaenc], [experimental daala cod
 dnl
 dnl  OpenAPV decoder plugin
 dnl
-PKG_ENABLE_MODULES_VLC([OPENAPV], [], [oapv >= 0.2], [OpenAPV decoder], [auto])
+PKG_ENABLE_MODULES_VLC([OPENAPV], [], [oapv >= 0.3], [OpenAPV decoder], [auto])
 
 dnl
 dnl  PNG decoder module


=====================================
modules/codec/meson.build
=====================================
@@ -158,7 +158,7 @@ vlc_modules += {
 }
 
 openapv_dep = dependency('oapv',
-                              version: '>= 0.2',
+                              version: '>= 0.3',
                               required: get_option('openapv'))
 vlc_modules += {
     'name' : 'openapv',


=====================================
modules/codec/openapv.c
=====================================
@@ -182,11 +182,11 @@ static oapv_imgb_t *GetImage( decoder_t *p_dec )
     for (int i = 0; i < pic->i_planes; i++)
     {
         imgb->w[i] = pic->p[i].i_visible_pitch / pic->p[i].i_pixel_pitch;
-        imgb->h[i] = pic->p[i].i_visible_lines / pic->p[i].i_pixel_pitch;
+        imgb->h[i] = pic->p[i].i_visible_lines;
 
         imgb->aw[i] = pic->p[i].i_pitch / pic->p[i].i_pixel_pitch;
         imgb->s[i] = pic->p[i].i_pitch;
-        imgb->ah[i] = pic->p[i].i_lines / pic->p[i].i_pixel_pitch;
+        imgb->ah[i] = pic->p[i].i_lines;
         imgb->e[i] = pic->p[i].i_lines;
         imgb->bsize[i] = imgb->s[i] * imgb->e[i];
         imgb->a[i] = pic->p[i].p_pixels;
@@ -218,7 +218,10 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
     ofrms.num_frms = 1;
     ofrms.frm[0].imgb = GetImage(p_dec);
     if (ofrms.frm[0].imgb == NULL)
+    {
+        block_Release(p_block);
         return VLCDEC_ECRITICAL; // no more memory ?
+    }
 
     bitb.addr = p_block->p_buffer;
     bitb.ssize = p_block->i_buffer;
@@ -228,6 +231,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
     {
         msg_Err( p_dec, "decoding error %d", err );
         ofrms.frm[0].imgb->release(ofrms.frm[0].imgb);
+        block_Release(p_block);
         return VLCDEC_ECRITICAL;
     }
 
@@ -240,6 +244,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
 
         decoder_QueueVideo( p_dec, decoded );
     }
+    block_Release(p_block);
     for (int i=0; i<stats.aui.num_frms; i++)
     {
         ofrms.frm[i].imgb->release(ofrms.frm[i].imgb);
@@ -344,6 +349,8 @@ int OpenAPVDecoder(vlc_object_t *o)
     dec->fmt_out.i_codec = FindVlcChroma(profile_idc, bit_depth_minus8, chroma_format_idc);
     dec->fmt_out.video.i_chroma = dec->fmt_out.i_codec;
 
+    dec->p_sys = sys;
+
     if (decoder_UpdateVideoOutput(dec, NULL) != 0)
     {
         msg_Err(o, "decoder_UpdateVideoOutput failed");
@@ -359,8 +366,6 @@ int OpenAPVDecoder(vlc_object_t *o)
         }
     }
 
-    dec->p_sys = sys;
-
     dec->pf_decode = Decode;
 
     return VLC_SUCCESS;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e07b64d57f2eece069c7299349796a2b0febd879...72af4be8335bb0c0a938fe2f2d8771c9db2bb6b4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e07b64d57f2eece069c7299349796a2b0febd879...72af4be8335bb0c0a938fe2f2d8771c9db2bb6b4
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list