@@ -1057,26 +1057,26 @@ std::shared_ptr<Frame> FFmpegReader::ReadStream(int64_t requested_frame) {
10571057
10581058 // Check if largest frame is still cached
10591059 frame = final_cache.GetFrame (largest_frame_processed);
1060- int samples_in_frame = Frame::GetSamplesPerFrame (requested_frame, info.fps ,
1061- info.sample_rate , info.channels );
1060+ int samples_in_frame = Frame::GetSamplesPerFrame (requested_frame, info.fps ,
1061+ info.sample_rate , info.channels );
10621062 if (frame) {
10631063 // Copy and return the largest processed frame (assuming it was the last in the video file)
1064- std::shared_ptr<Frame> f = CreateFrame (largest_frame_processed);
1064+ std::shared_ptr<Frame> f = CreateFrame (largest_frame_processed);
10651065
1066- // Use solid color (if no image data found)
1067- if (!frame->has_image_data ) {
1068- // Use solid black frame if no image data available
1069- f->AddColor (info.width , info.height , " #000" );
1070- }
1071- // Silence audio data (if any), since we are repeating the last frame
1072- frame->AddAudioSilence (samples_in_frame);
1066+ // Use solid color (if no image data found)
1067+ if (!frame->has_image_data ) {
1068+ // Use solid black frame if no image data available
1069+ f->AddColor (info.width , info.height , " #000" );
1070+ }
1071+ // Silence audio data (if any), since we are repeating the last frame
1072+ frame->AddAudioSilence (samples_in_frame);
10731073
10741074 return frame;
10751075 } else {
10761076 // The largest processed frame is no longer in cache, return a blank frame
10771077 std::shared_ptr<Frame> f = CreateFrame (largest_frame_processed);
10781078 f->AddColor (info.width , info.height , " #000" );
1079- f->AddAudioSilence (samples_in_frame);
1079+ f->AddAudioSilence (samples_in_frame);
10801080 return f;
10811081 }
10821082 }
@@ -1787,8 +1787,8 @@ void FFmpegReader::Seek(int64_t requested_frame) {
17871787 if (requested_frame > info.video_length )
17881788 requested_frame = info.video_length ;
17891789 if (requested_frame > largest_frame_processed && packet_status.end_of_file ) {
1790- // Not possible to search past largest_frame once EOF is reached (no more packets)
1791- return ;
1790+ // Not possible to search past largest_frame once EOF is reached (no more packets)
1791+ return ;
17921792 }
17931793
17941794 // Debug output
0 commit comments