Commit bb753598 authored by conrad's avatar conrad

Don't map all errors to OGGZ_ERR_STOP_ERR

Required for Mozilla bug 481933
Exposes detected HOLE_IN_DATA as return value from oggz_read(), oggz_read_input(),
+ add documentation for extra return values

git-svn-id: http://svn.annodex.net/liboggz/trunk@3877 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 1e0cafc9
...@@ -158,6 +158,7 @@ int oggz_set_read_page (OGGZ * oggz, long serialno, ...@@ -158,6 +158,7 @@ int oggz_set_read_page (OGGZ * oggz, long serialno,
* returning OGGZ_STOP_OK * returning OGGZ_STOP_OK
* \retval OGGZ_ERR_STOP_ERR Reading was stopped by a user callback * \retval OGGZ_ERR_STOP_ERR Reading was stopped by a user callback
* returning OGGZ_STOP_ERR * returning OGGZ_STOP_ERR
* \retval OGGZ_ERR_HOLE_IN_DATA Hole (sequence number gap) detected in input data
* \retval OGGZ_ERR_OUT_OF_MEMORY Out of memory * \retval OGGZ_ERR_OUT_OF_MEMORY Out of memory
*/ */
long oggz_read (OGGZ * oggz, long n); long oggz_read (OGGZ * oggz, long n);
...@@ -174,6 +175,8 @@ long oggz_read (OGGZ * oggz, long n); ...@@ -174,6 +175,8 @@ long oggz_read (OGGZ * oggz, long n);
* returning OGGZ_STOP_OK * returning OGGZ_STOP_OK
* \retval OGGZ_ERR_STOP_ERR Reading was stopped by a user callback * \retval OGGZ_ERR_STOP_ERR Reading was stopped by a user callback
* returning OGGZ_STOP_ERR * returning OGGZ_STOP_ERR
* \retval OGGZ_ERR_HOLE_IN_DATA Hole (sequence number gap) detected in input data
* \retval OGGZ_ERR_OUT_OF_MEMORY Out of memory
*/ */
long oggz_read_input (OGGZ * oggz, unsigned char * buf, long n); long oggz_read_input (OGGZ * oggz, unsigned char * buf, long n);
......
...@@ -634,7 +634,7 @@ oggz_map_return_value_to_error (int cb_ret) ...@@ -634,7 +634,7 @@ oggz_map_return_value_to_error (int cb_ret)
case OGGZ_STOP_ERR: case OGGZ_STOP_ERR:
return OGGZ_ERR_STOP_ERR; return OGGZ_ERR_STOP_ERR;
default: default:
return OGGZ_ERR_STOP_ERR; return cb_ret;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment