Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-04 08:29:23 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-04 08:29:23 +0300
commit328953e1896432bc700b9b5c69ae2987c5d752f4 (patch)
tree10f574c6f6e3c42644728f352747ce97d78171ea /tests
parentf6f8487b76f234437e7d4c2831e630d9d06cb074 (diff)
Making calls to opus_packet_pad() on a bad packet return OPUS_INVALID_PACKET
We were previously returning OPUS_BAD_ARG because the failure was only detected in opus_repacketizer_out_range_impl() rather than in opus_repacketizer_cat(). Checking the return value from opus_repacketizer_cat() also addresses the last outstanding Coverity defect.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_opus_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_opus_api.c b/tests/test_opus_api.c
index 9bfa5cca..489052d2 100644
--- a/tests/test_opus_api.c
+++ b/tests/test_opus_api.c
@@ -1699,9 +1699,9 @@ int test_repacketizer_api(void)
cfgs++;
if(opus_multistream_packet_pad(po,4,4,1)!=OPUS_OK)test_failed();
cfgs++;
- if(opus_packet_pad(po,4,5)!=OPUS_BAD_ARG)test_failed();
+ if(opus_packet_pad(po,4,5)!=OPUS_INVALID_PACKET)test_failed();
cfgs++;
- if(opus_multistream_packet_pad(po,4,5,1)!=OPUS_BAD_ARG)test_failed();
+ if(opus_multistream_packet_pad(po,4,5,1)!=OPUS_INVALID_PACKET)test_failed();
cfgs++;
if(opus_packet_pad(po,0,5)!=OPUS_BAD_ARG)test_failed();
cfgs++;