Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add packet_get_samples_per_frame, some error query, prevent of read o…
…ut of bounds
  • Loading branch information
dafoxia committed May 24, 2014
commit 96021e42953bc4eedacd1c23fca9e05614834861
1 change: 1 addition & 0 deletions lib/opus-ruby/decoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def decode( data )

frame_size = Opus.opus_decode @decoder, packet, len, decoded, max_size, 0
if frame_size < 0 then
@lasterror = frame_size
frame_size = 0
end
return decoded.read_string_length frame_size * 2
Expand Down