Changeset 95665 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 15, 2022 3:50:58 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/WebMWriter.h
r93115 r95665 553 553 uint64_t GetAvailableSpace(void); 554 554 555 /** 556 * Returns the number of written WebM clusters. 557 * 558 * @returns Number of written WebM clusters; 0 when no clusters written (empty file). 559 */ 560 uint64_t GetClusters(void) const { return CurSeg.cClusters; } 561 555 562 protected: 556 563 -
trunk/src/VBox/Main/src-client/RecordingStream.cpp
r94966 r95665 800 800 vrc = File.pWEBM->OpenEx(pszFile, &this->File.hFile, 801 801 #ifdef VBOX_WITH_AUDIO_RECORDING 802 fAudioEnabled ? WebMWriter::AudioCodec_Opus : WebMWriter::AudioCodec_None,802 fAudioEnabled ? WebMWriter::AudioCodec_Opus : WebMWriter::AudioCodec_None, 803 803 #else 804 WebMWriter::AudioCodec_None,805 #endif 806 fVideoEnabled ? WebMWriter::VideoCodec_VP8 : WebMWriter::VideoCodec_None);804 WebMWriter::AudioCodec_None, 805 #endif 806 fVideoEnabled ? WebMWriter::VideoCodec_VP8 : WebMWriter::VideoCodec_None); 807 807 if (RT_FAILURE(vrc)) 808 808 { … … 941 941 } 942 942 943 if (this->File.pWEBM) 944 { 945 delete this->File.pWEBM; 943 WebMWriter *pWebMWriter = this->File.pWEBM; 944 AssertPtr(pWebMWriter); 945 946 if (pWebMWriter) 947 { 948 /* If no clusters (= data) was written, delete the file again. */ 949 if (pWebMWriter->GetClusters() == 0) 950 { 951 int vrc2 = RTFileDelete(this->ScreenSettings.File.strName.c_str()); 952 AssertRC(vrc2); /* Ignore rc on non-debug builds. */ 953 } 954 955 delete pWebMWriter; 956 pWebMWriter = NULL; 957 946 958 this->File.pWEBM = NULL; 947 959 } -
trunk/src/VBox/Main/src-client/WebMWriter.cpp
r94962 r95665 151 151 close(); 152 152 153 int vrc = VINF_SUCCESS; 154 155 /* If no clusters (= data) was written, delete the file again. */ 156 if (!CurSeg.cClusters) 157 vrc = RTFileDelete(strFileName.c_str()); 158 159 LogFlowFuncLeaveRC(vrc); 160 return vrc; 153 return VINF_SUCCESS; 161 154 } 162 155
Note:
See TracChangeset
for help on using the changeset viewer.