• Moto Hira's avatar
    Tweak managed pointer interface (#3249) · ea78478e
    Moto Hira authored
    Summary:
    Pull Request resolved: https://github.com/pytorch/audio/pull/3249
    
    - Put ptr member private so that it's more secure and subclasses won't mess with it
    - Remove unused `reset` method
    - Do not default construct the managed object
      - Introduce helper function for default allocation.
        (for AVFrame and AVPacket as they are allocated in both reader and writer)
      - for others, allocation logics are moved to where it is used.
    - Remove unused `pHWBufferRef` attribute from `StreamWriter`.
    
    Reviewed By: hwangjeff
    
    Differential Revision: D44775297
    
    fbshipit-source-id: ff6db528152cd54c1ae398191110c30b9c1e238c
    ea78478e
ffmpeg.cpp 4.92 KB