diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-04 01:29:23 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-04 01:29:23 -0400 |
commit | 328953e1896432bc700b9b5c69ae2987c5d752f4 (patch) | |
tree | 10f574c6f6e3c42644728f352747ce97d78171ea /tests/test_opus_api.c | |
parent | f6f8487b76f234437e7d4c2831e630d9d06cb074 (diff) | |
download | opus-328953e1896432bc700b9b5c69ae2987c5d752f4.tar.gz |
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/test_opus_api.c')
-rw-r--r-- | tests/test_opus_api.c | 4 |
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++; |