@@ -37,7 +37,7 @@ static int CUDAAPI
3737pfnSequenceCallback (void * pUserData, CUVIDEOFORMAT* videoFormat) {
3838 BetaCudaDeviceInterface* decoder =
3939 static_cast <BetaCudaDeviceInterface*>(pUserData);
40- return static_cast < int >( decoder->streamPropertyChange (videoFormat) );
40+ return decoder->streamPropertyChange (videoFormat);
4141}
4242
4343static int CUDAAPI
@@ -217,8 +217,7 @@ void BetaCudaDeviceInterface::initializeInterface(AVStream* avStream) {
217217// TODONVDEC P1: Code below mostly assume this is called only once at the start,
218218// we should handle the case of multiple calls. Probably need to flush buffers,
219219// etc.
220- unsigned char BetaCudaDeviceInterface::streamPropertyChange (
221- CUVIDEOFORMAT* videoFormat) {
220+ int BetaCudaDeviceInterface::streamPropertyChange (CUVIDEOFORMAT* videoFormat) {
222221 TORCH_CHECK (videoFormat != nullptr , " Invalid video format" );
223222
224223 videoFormat_ = *videoFormat;
@@ -243,7 +242,7 @@ unsigned char BetaCudaDeviceInterface::streamPropertyChange(
243242 // DALI also returns min_num_decode_surfaces from this function. This
244243 // instructs the parser to reset its ulMaxNumDecodeSurfaces field to this
245244 // value.
246- return videoFormat_.min_num_decode_surfaces ;
245+ return static_cast < int >( videoFormat_.min_num_decode_surfaces ) ;
247246}
248247
249248// Moral equivalent of avcodec_send_packet(). Here, we pass the AVPacket down to
0 commit comments