diff --git a/src/video/imx.c b/src/video/imx.c index 5faf279..3d83f32 100644 --- a/src/video/imx.c +++ b/src/video/imx.c @@ -84,6 +84,11 @@ bool video_imx_init() { } static void decoder_renderer_setup(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags) { + if (videoFormat != VIDEO_FORMAT_H264) { + fprintf(stderr, "Video format not supported\n"); + exit(1); + } + struct mxcfb_gbl_alpha alpha; dbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; diff --git a/src/video/pi.c b/src/video/pi.c index 8d8f6b7..d5b87e9 100644 --- a/src/video/pi.c +++ b/src/video/pi.c @@ -54,6 +54,11 @@ static int port_settings_changed; static int first_packet; static void decoder_renderer_setup(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags) { + if (videoFormat != VIDEO_FORMAT_H264) { + fprintf(stderr, "Video format not supported\n"); + exit(1); + } + bcm_host_init(); gs_sps_init(width, height); diff --git a/src/video/sdl.c b/src/video/sdl.c index 70a0e62..519553e 100644 --- a/src/video/sdl.c +++ b/src/video/sdl.c @@ -33,6 +33,11 @@ static char* ffmpeg_buffer; static void sdl_setup(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags) { + if (videoFormat != VIDEO_FORMAT_H264) { + fprintf(stderr, "Video format not supported\n"); + exit(1); + } + int avc_flags = SLICE_THREADING; if (drFlags && FORCE_HARDWARE_ACCELERATION) avc_flags |= HARDWARE_ACCELERATION;