vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Nov 23 16:55:17 2017 +0100| [af7b35383052ca6b9d5bd5a0e3a8a5320b4a7b78] | committer: Hugo Beauzée-Luyssen
zvbi: Don't pass video_format_t by copy CID #1160816 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af7b35383052ca6b9d5bd5a0e3a8a5320b4a7b78 --- modules/codec/zvbi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c index 343c0bcd4f..6b7be22346 100644 --- a/modules/codec/zvbi.c +++ b/modules/codec/zvbi.c @@ -182,7 +182,7 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt, static void EventHandler( vbi_event *ev, void *user_data ); static int OpaquePage( picture_t *p_src, const vbi_page *p_page, - const video_format_t fmt, bool b_opaque, const int text_offset ); + const video_format_t *p_fmt, bool b_opaque, const int text_offset ); static int get_first_visible_row( vbi_char *p_text, int rows, int columns); static int get_last_visible_row( vbi_char *p_text, int rows, int columns); @@ -497,7 +497,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block ) memcpy( p_sys->nav_link, &p_page.nav_link, sizeof( p_sys->nav_link )) ; vlc_mutex_unlock( &p_sys->lock ); - OpaquePage( p_pic, &p_page, fmt, b_opaque, i_first_row * p_page.columns ); + OpaquePage( p_pic, &p_page, &fmt, b_opaque, i_first_row * p_page.columns ); } exit: @@ -641,16 +641,16 @@ static int get_last_visible_row( vbi_char *p_text, int rows, int columns) } static int OpaquePage( picture_t *p_src, const vbi_page *p_page, - const video_format_t fmt, bool b_opaque, const int text_offset ) + const video_format_t *p_fmt, bool b_opaque, const int text_offset ) { unsigned int x, y; - assert( fmt.i_chroma == VLC_CODEC_RGBA ); + assert( p_fmt->i_chroma == VLC_CODEC_RGBA ); /* Kludge since zvbi doesn't provide an option to specify opacity. */ - for( y = 0; y < fmt.i_height; y++ ) + for( y = 0; y < p_fmt->i_height; y++ ) { - for( x = 0; x < fmt.i_width; x++ ) + for( x = 0; x < p_fmt->i_width; x++ ) { const vbi_opacity opacity = p_page->text[ text_offset + y/10 * p_page->columns + x/12 ].opacity; const int background = p_page->text[ text_offset + y/10 * p_page->columns + x/12 ].background; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
