File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ void VideoDecoder::initializeDecoder() {
179179 if (fps > 0 ) {
180180 streamMetadata.averageFps = fps;
181181 }
182+ containerMetadata_.numVideoStreams ++;
182183 } else if (avStream->codecpar ->codec_type == AVMEDIA_TYPE_AUDIO) {
183184 int numSamplesPerFrame = avStream->codecpar ->frame_size ;
184185 int sampleRate = avStream->codecpar ->sample_rate ;
@@ -190,8 +191,6 @@ void VideoDecoder::initializeDecoder() {
190191 streamMetadata.averageFps =
191192 static_cast <double >(sampleRate) / numSamplesPerFrame;
192193 }
193- containerMetadata_.numVideoStreams ++;
194- } else if (avStream->codecpar ->codec_type == AVMEDIA_TYPE_AUDIO) {
195194 containerMetadata_.numAudioStreams ++;
196195 }
197196
You can’t perform that action at this time.
0 commit comments