[vlc-commits] vda: remove write-only i_width

Tristan Matthews git at videolan.org
Fri Oct 21 19:10:44 CEST 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Fri Oct 21 13:08:44 2016 -0400| [35e609b8d9a8fa8a5834047fe92d0855dfe366fb] | committer: Tristan Matthews

vda: remove write-only i_width

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35e609b8d9a8fa8a5834047fe92d0855dfe366fb
---

 modules/codec/avcodec/vda.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 270eb21..29c0944 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -53,12 +53,10 @@ static void Release( void *opaque, uint8_t *data );
 
 static void copy420YpCbCr8Planar(picture_t *p_pic,
                                  CVPixelBufferRef buffer,
-                                 unsigned i_width,
                                  unsigned i_height)
 {
     uint8_t *pp_plane[2];
     size_t pi_pitch[2];
-    VLC_UNUSED(i_width);
 
     if (!buffer)
         return;
@@ -87,7 +85,6 @@ vlc_module_end ()
 struct vlc_va_sys_t
 {
     AVVDAContext *vdactx;
-    int i_width;
     int i_height;
 };
 
@@ -133,7 +130,6 @@ static int Open(vlc_va_t *va,
 
     sys->vdactx = av_vda_alloc_context();
     sys->vdactx->cv_pix_fmt_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
-    sys->i_width = avctx->width;
     sys->i_height = avctx->height;
 
     int i_ret = av_vda_default_init2(avctx, sys->vdactx);
@@ -188,7 +184,7 @@ static int Extract( vlc_va_t *va, picture_t *p_picture, uint8_t *data )
         return VLC_EGENERIC;
     }
 
-    copy420YpCbCr8Planar( p_picture, cv_buffer, sys->i_width, sys->i_height );
+    copy420YpCbCr8Planar( p_picture, cv_buffer, sys->i_height );
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list