[vlc-commits] video_format: fix initialization of f_pose_fov_degrees
Filip Roséen
git at videolan.org
Tue Nov 15 18:14:00 CET 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Nov 14 23:38:36 2016 +0100| [53df56a9298f1b3aa8bd3765ebb16b613cddb113] | committer: Thomas Guillem
video_format: fix initialization of f_pose_fov_degrees
We cannot initialize video_format_t.f_pose_fov_degrees in
es_format_Init given that it is a member of video_format_t, meaning
that it will be overwritten on invocations of video_format_Init.
These changes simply moves the initialization to where it actually
belongs.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53df56a9298f1b3aa8bd3765ebb16b613cddb113
---
include/vlc_es.h | 1 +
src/misc/es_format.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index 11d3795..46c6582 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -339,6 +339,7 @@ static inline void video_format_Init( video_format_t *p_src, vlc_fourcc_t i_chro
p_src->i_chroma = i_chroma;
p_src->i_sar_num = p_src->i_sar_den = 1;
p_src->p_palette = NULL;
+ p_src->f_pose_fov_degrees = DEFAULT_FIELD_OF_VIEW_DEGREES;
}
/**
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index ded0646..d646e78 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -454,8 +454,6 @@ void es_format_Init( es_format_t *fmt,
memset( &fmt->video, 0, sizeof(video_format_t) );
memset( &fmt->subs, 0, sizeof(subs_format_t) );
- fmt->video.f_pose_fov_degrees = DEFAULT_FIELD_OF_VIEW_DEGREES;
-
fmt->b_packetized = true;
fmt->i_bitrate = 0;
fmt->i_extra = 0;
More information about the vlc-commits
mailing list