File tree Expand file tree Collapse file tree 4 files changed +4
-16
lines changed
Expand file tree Collapse file tree 4 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -232,9 +232,8 @@ BetaCudaDeviceInterface::~BetaCudaDeviceInterface() {
232232void BetaCudaDeviceInterface::initialize (
233233 const AVStream* avStream,
234234 const UniqueDecodingAVFormatContext& avFormatCtx,
235- const SharedAVCodecContext& codecContext) {
235+ [[maybe_unused]] const SharedAVCodecContext& codecContext) {
236236 TORCH_CHECK (avStream != nullptr , " AVStream cannot be null" );
237- codecContext_ = codecContext;
238237 timeBase_ = avStream->time_base ;
239238 frameRateAvgFromFFmpeg_ = avStream->r_frame_rate ;
240239
Original file line number Diff line number Diff line change @@ -95,10 +95,9 @@ class DeviceInterface {
9595 // Returns AVSUCCESS on success, or other AVERROR on failure
9696 // Default implementation uses FFmpeg directly
9797 virtual int sendEOFPacket () {
98- if (!codecContext_) {
99- TORCH_CHECK (false , " Codec context not available for EOF packet sending" );
100- return AVERROR (EINVAL);
101- }
98+ TORCH_CHECK (
99+ codecContext_ != nullptr ,
100+ " Codec context not available for default EOF packet sending" );
102101 return avcodec_send_packet (codecContext_.get (), nullptr );
103102 }
104103
Original file line number Diff line number Diff line change @@ -149,15 +149,6 @@ int getNumChannels(const UniqueAVFrame& avFrame) {
149149#endif
150150}
151151
152- int getNumChannels (const UniqueAVCodecContext& avCodecContext) {
153- #if LIBAVFILTER_VERSION_MAJOR > 8 || \
154- (LIBAVFILTER_VERSION_MAJOR == 8 && LIBAVFILTER_VERSION_MINOR >= 44 )
155- return avCodecContext->ch_layout .nb_channels ;
156- #else
157- return avCodecContext->channels ;
158- #endif
159- }
160-
161152int getNumChannels (const SharedAVCodecContext& avCodecContext) {
162153#if LIBAVFILTER_VERSION_MAJOR > 8 || \
163154 (LIBAVFILTER_VERSION_MAJOR == 8 && LIBAVFILTER_VERSION_MINOR >= 44 )
Original file line number Diff line number Diff line change @@ -173,7 +173,6 @@ const AVSampleFormat* getSupportedOutputSampleFormats(const AVCodec& avCodec);
173173const AVPixelFormat* getSupportedPixelFormats (const AVCodec& avCodec);
174174
175175int getNumChannels (const UniqueAVFrame& avFrame);
176- int getNumChannels (const UniqueAVCodecContext& avCodecContext);
177176int getNumChannels (const SharedAVCodecContext& avCodecContext);
178177
179178void setDefaultChannelLayout (
You can’t perform that action at this time.
0 commit comments