Update library name.
Delete free operation for struct pointer.

packet->packet points to a data structure owned by ogg_stream_state. this data must not be freed by ogg_packet (but will be deallocated by ogg_stream_clear instead).

(see framing.c:1015  in libogg)
Deallocate stream state handle with corresponding library method (ogg_stream_destroy).
Disable javah.
Remove sourceLength > length check. This cannot be asserted in all cases. At the end of the page, less bytes than the allocated buffer size may be written to the stream.
Replace nested try-with-resources with single statement.
Replace java.library.path system property for surefire with corresponding arg line.

Surefire modifies the system property after VM startup. For inclusion of native code the system property has to be at VM initialization time already.
Replace decode/encode main methods with unit tests.
Abstract opus encoder and decoder as I/O streams.
Mark test sources directory for IDEA, define test packages.
Make encoder/decoder extend OpusHandleBasedSupport
Encapsulate logic to make OggSyncStateInput return 1 ogg page on each read.
Turn OggSyncStateInput into an iterator (similar to a scanner instead of a stream).
Fix decoder iteration to read all pages and all ogg packages.
Add minimal metadata in case the user didn't set any.
Move opus encoder test to opus package.