Fix the handling of discard_before_pts (#2841)
Summary: Currently `discard_before_pts=-1` is used to indicate no AVFrame should be skipped. It was reported that some corrupted video can have constant negative pts value. It is technically UB for such corrupted data, but still all the AVFrame should be decoded as long as `seek` is not used. This commit changes the decoder so that it processes AVFrame if `discard_before_pts==-1` disregard of AVFrame::pts value. Pull Request resolved: https://github.com/pytorch/audio/pull/2841 Reviewed By: hwangjeff Differential Revision: D41174442 Pulled By: mthrok fbshipit-source-id: e9d2fab4b0e2bc47146eda8e1dd377a74c087590
Showing
Please register or sign in to comment