Skip to content

Commit b8c027f

Browse files
committed
debug
1 parent 886e302 commit b8c027f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/torchcodec/decoders/_core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD 17)
44
set(CMAKE_CXX_STANDARD_REQUIRED ON)
55

66
find_package(Torch REQUIRED)
7-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror ${TORCH_CXX_FLAGS}")
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic ${TORCH_CXX_FLAGS}")
88
find_package(Python3 ${PYTHON_VERSION} EXACT COMPONENTS Development)
99

1010
function(make_torchcodec_library library_name ffmpeg_target)

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,8 @@ VideoDecoder::AVFrameStream VideoDecoder::decodeAVFrame(
960960
// Is this the kind of frame we're looking for?
961961
if (ffmpegStatus == AVSUCCESS && filterFunction(avFrame.get())) {
962962
// Yes, this is the frame we'll return; break out of the decoding loop.
963+
printf("%ld %ld\n", avFrame->pts, avFrame->duration);
964+
963965
break;
964966
} else if (ffmpegStatus == AVSUCCESS) {
965967
// No, but we received a valid frame - just not the kind we're looking
@@ -1070,13 +1072,13 @@ VideoDecoder::FrameOutput VideoDecoder::convertAVFrameToFrameOutput(
10701072
auto sampleRate = avFrame->sample_rate;
10711073
auto numChannels = avFrame->ch_layout.nb_channels;
10721074

1073-
printf("numSamples: %d\n", numSamples);
1074-
printf("sample rate: %d\n", sampleRate);
1075+
// printf("numSamples: %d\n", numSamples);
1076+
// printf("sample rate: %d\n", sampleRate);
10751077

1076-
printf("numChannels: %d\n", numChannels);
1078+
// printf("numChannels: %d\n", numChannels);
10771079
int bytesPerSample =
10781080
av_get_bytes_per_sample(streamInfo.codecContext->sample_fmt);
1079-
printf("bytes per sample: %d\n", bytesPerSample);
1081+
// printf("bytes per sample: %d\n", bytesPerSample);
10801082

10811083
// Assuming format is FLTP (float 32bits ???)
10821084

0 commit comments

Comments
 (0)