summaryrefslogtreecommitdiff
path: root/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'compress.c')
-rw-r--r--compress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compress.c b/compress.c
index 5845cae..54d94d7 100644
--- a/compress.c
+++ b/compress.c
@@ -579,8 +579,13 @@ int compress_set_next_track_param(struct compress *compress,
if (!is_compress_running(compress))
return oops(compress, ENODEV, "device not ready");
+ if (codec_options == NULL)
+ return oops(compress, ENODEV, "codec_option NULL");
+
+#ifdef SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM
if (ioctl(compress->fd, SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM, codec_options))
return oops(compress, errno, "cannot set next track params\n");
+#endif
return 0;
}
#endif