[vlc-commits] video context: don't create video contexts with no type
Steve Lhomme
git at videolan.org
Tue Nov 5 16:05:37 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 24 15:10:39 2019 +0200| [a75a8ba4cd30bfc5163b416ae28a2f86884d26a0] | committer: Steve Lhomme
video context: don't create video contexts with no type
We keep VLC_VIDEO_CONTEXT_NONE to 0 to make sure some context are not created
accidentally with a type value of 0.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a75a8ba4cd30bfc5163b416ae28a2f86884d26a0
---
src/input/decoder_helpers.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index 3d8a06985d..3f1eb9ff1d 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -243,6 +243,7 @@ vlc_video_context * vlc_video_context_Create(vlc_decoder_device *device,
size_t private_size,
const struct vlc_video_context_operations *ops)
{
+ assert(private_type != VLC_VIDEO_CONTEXT_NONE); // use a NULL video context for that
vlc_video_context *vctx = malloc(sizeof(*vctx) + private_size);
if (unlikely(vctx == NULL))
return NULL;
More information about the vlc-commits
mailing list