search for: op_pcm_seek

Displaying 11 results from an estimated 11 matches for "op_pcm_seek".

2017 Nov 20
0
[PATCH 1/2] op_pcm_seek: fix int64 overflow
check for overflow with a negative diff --- src/opusfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opusfile.c b/src/opusfile.c index 72f1272..df326af 100644 --- a/src/opusfile.c +++ b/src/opusfile.c @@ -2605,7 +2605,11 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){ would be better just to do a full seek.*/ if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ ogg_int64_t discard_count; - discard_count=_pcm_offset-diff; + /*Check for overflow.*/ + if(diff<0&&amp...
2017 Nov 20
7
[PATCH 0/2] libopusfile int64 overflows
Just an attempt to avoid overflows with an explicit check, I don't know if there's a better way to identify corrupt input here. James Zern (2): op_pcm_seek: fix int64 overflow op_fetch_and_process_page: fix int64 overflow src/opusfile.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.15.0.448.gf294e3d99a-goog
2015 Nov 05
3
Opusfile seeking bug
...this would be preferred. I would try and fix it and submit a patch myself, but this is all on the companies time and I?ve got managers pressuring me to get on with fixing other things, sorry. Short Description: When a file contains ogg packets which have been split over ogg page boundaries, using op_pcm_seek to seek to a position that falls into the packet that has been split results in an OP_EBADLINK error being returned. This seems to be because the library doesn?t account for the fact that packets that do not finish on the page, do not count towards its granule position, even if they start on it. Th...
2013 May 09
2
opus file trimming/clipping
Hello, I am new to opus and C, so please forgive my basic question. I am trying to trim a file to remove an extract at a specified starting and ending time -- an example would be to save an excerpt from a song as a ringtone. What is the best way to accomplish this? I have been trying to use op_pcm_seek, and the documentation for op_pcm_seek says "Seek to the specified PCM offset, such that decoding will begin at exactly the requested position." Question: Is this the right approach and how do I then specify where the decoding is supposed to stop? I will describe the steps I've tri...
2017 Dec 07
2
[PATCH 0/2] libopusfile int64 overflows
...e.com> wrote: > On Mon, Nov 20, 2017 at 1:07 PM, James Zern <jzern at google.com> wrote: >> Just an attempt to avoid overflows with an explicit check, I don't know if >> there's a better way to identify corrupt input here. >> >> James Zern (2): >> op_pcm_seek: fix int64 overflow >> op_fetch_and_process_page: fix int64 overflow >> >> src/opusfile.c | 11 +++++++++-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> > > Any comments on these? > ping. >> -- >> 2.15.0.448.gf294e3d99a-goog >>
2017 Dec 07
0
[PATCH 0/2] libopusfile int64 overflows
...On Mon, Nov 20, 2017 at 1:07 PM, James Zern <jzern at google.com> wrote: >>> Just an attempt to avoid overflows with an explicit check, I don't know if >>> there's a better way to identify corrupt input here. >>> >>> James Zern (2): >>> op_pcm_seek: fix int64 overflow >>> op_fetch_and_process_page: fix int64 overflow >>> >>> src/opusfile.c | 11 +++++++++-- >>> 1 file changed, 9 insertions(+), 2 deletions(-) >>> >> >> Any comments on these? >> > > ping. Sorry, I can...
2016 Nov 14
1
Help with Opus Streaming
...ll use its seeking implementation. Just provide the `op_read_func`, `op_seek_func`, and `op_tell_func` callbacks on top of your current fetch framework. The library will call your seek implementation with the necessary byte offsets to find and resume decoding at the requested position when you call op_pcm_seek(). > Is there anyway to get or calculate the byte offset corresponding to the > PCM time position? Then I can ask the server to serve the file from that > byte onwards. Yes, but the process is somewhat indirect. As Philipp said, there's no seek table in .opus resources, and they'...
2017 Nov 28
0
[PATCH 0/2] libopusfile int64 overflows
On Mon, Nov 20, 2017 at 1:07 PM, James Zern <jzern at google.com> wrote: > Just an attempt to avoid overflows with an explicit check, I don't know if > there's a better way to identify corrupt input here. > > James Zern (2): > op_pcm_seek: fix int64 overflow > op_fetch_and_process_page: fix int64 overflow > > src/opusfile.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > Any comments on these? > -- > 2.15.0.448.gf294e3d99a-goog >
2017 Dec 07
1
[PATCH 0/2] libopusfile int64 overflows
...tually get > that e-mail due to local trouble with my mail server. I could pull the > patches from the list archive, however. Thanks for the reports. > Thanks for recovering them and having a look. I updated both patches. > For the first patch: > >> @@ -2605,7 +2605,11 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t >> _pcm_offset){ >> would be better just to do a full seek.*/ >> if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ >> ogg_int64_t discard_count; >> - discard_count=_pcm_offset-diff; >> +...
2016 Nov 08
2
Help with Opus Streaming
On 2016-11-08 1:59 AM, Philipp Schafft wrote: > Some notes: > * libvorbisfile has a nice implementation of that, it also takes > care of matching the signal at the very point of the jump. I would recommend the opusfile library, which implements seeking specifically for Opus streams. https://archive.mozilla.org/pub/opus/opusfile-0.8.zip
2013 Jul 17
0
opusfile, compiler warnings
...ferred_sr.offset' may be used uninitialized in this function src/opusfile.c:320: warning: 'preferred_sr.search_start' may be used uninitialized in this function src/opusfile.c:1131: warning: 'end_offset' may be used uninitialized in this function src/opusfile.c: In function 'op_pcm_seek': src/opusfile.c:2417: warning: 'li' may be used uninitialized in this function ## Mac OS X x86_64 builds (against 10.6 SDK) ## additional CFLAGS used: -fno-common -force_cpusubtype_ALL -mmacosx-version-min=10.5 ## additional LDFLAGS used: -mmacosx-version-min=10.5 $ ./x86_64-apple-dar...