• moto's avatar
    Flush and reset internal state after seek (#2264) · 7e1afc40
    moto authored
    Summary:
    This commit adds the following behavior to `seek` so that `seek`
    works after a frame is decoded.
    
    1. Flush the decoder buffer.
    2. Recreate filter graphs (so that internal state is re-initialized)
    3. Discard the buffered tensor. (decoded chunks)
    
    Also it disallows negative values for seek timestamp.
    
    Pull Request resolved: https://github.com/pytorch/audio/pull/2264
    
    Reviewed By: carolineechen
    
    Differential Revision: D34497826
    
    Pulled By: mthrok
    
    fbshipit-source-id: 8b9a5bf160dfeb15f5cced3eed2288c33e2eb35d
    7e1afc40
sink.h 597 Bytes