leon 4 hafta önce
ebeveyn
işleme
073d5c8242
1 değiştirilmiş dosya ile 2 ekleme ve 8 silme
  1. 2 8
      src/nodes/stream/streamNode.cpp

+ 2 - 8
src/nodes/stream/streamNode.cpp

@@ -36,13 +36,7 @@ bool StreamNode::open_stream() {
             return false;
         }
 
-        // auto codec_id = demuxer_->get_video_codec();
-        // if (codec_id == AV_CODEC_ID_NONE) {
-        //      fprintf(stderr, "StreamNode [%s] Error: Could not get video codec from demuxer for %s\n", name_.c_str(), stream_url_.c_str());
-        //      demuxer_.reset(); // Clean up demuxer
-        //      status_ = StreamStatus::OPEN_FAILED;
-        //      return false;
-        // }
+        auto codec_id = demuxer_->get_video_codec();
 
         decoder_ = FFHDDecoder::create_cuvid_decoder(
             false, FFHDDecoder::ffmpeg2NvCodecId(codec_id), -1, gpu_id_, nullptr, nullptr, true
@@ -294,7 +288,7 @@ void StreamNode::process_stream_gpu()
             try 
             {
                  // Pass pointers to get the actual index and PTS for the current frame
-                frame_data = decoder_->get_frame(&frame_pts, current_frame_index);
+                frame_data = decoder_->get_frame(&frame_pts, &current_frame_index);
             } 
             catch (const std::exception& ex) { // Catch potential exceptions from get_frame implementation
                  fprintf(stderr, "StreamNode [%s] Error: Exception during decoder_->get_frame(): %s\n", name_.c_str(), ex.what());