mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 15:20:42 +01:00
Use **** code for codec of unknown type
This allows dumping kVideoCodecGeneric to IVF. Bug: none Change-Id: I71ae5f11dc226f68aa60e4423556feb1af96d11c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226865 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34543}
This commit is contained in:
parent
fd3b97c5d2
commit
d4b087c6cf
2 changed files with 12 additions and 2 deletions
|
@ -88,8 +88,13 @@ bool IvfFileWriter::WriteHeader() {
|
|||
ivf_header[11] = '4';
|
||||
break;
|
||||
default:
|
||||
RTC_LOG(LS_ERROR) << "Unknown CODEC type: " << codec_type_;
|
||||
return false;
|
||||
// For unknown codec type use **** code. You can specify actual payload
|
||||
// format when playing the video with ffplay: ffplay -f H263 file.ivf
|
||||
ivf_header[8] = '*';
|
||||
ivf_header[9] = '*';
|
||||
ivf_header[10] = '*';
|
||||
ivf_header[11] = '*';
|
||||
break;
|
||||
}
|
||||
|
||||
ByteWriter<uint16_t>::WriteLittleEndian(&ivf_header[12], width_);
|
||||
|
|
|
@ -167,6 +167,11 @@ TEST_F(IvfFileWriterTest, WritesBasicH264FileMsTimestamp) {
|
|||
RunBasicFileStructureTest(kVideoCodecH264, fourcc, true);
|
||||
}
|
||||
|
||||
TEST_F(IvfFileWriterTest, WritesBasicUnknownCodecFileMsTimestamp) {
|
||||
const uint8_t fourcc[4] = {'*', '*', '*', '*'};
|
||||
RunBasicFileStructureTest(kVideoCodecGeneric, fourcc, true);
|
||||
}
|
||||
|
||||
TEST_F(IvfFileWriterTest, ClosesWhenReachesLimit) {
|
||||
const uint8_t fourcc[4] = {'V', 'P', '8', '0'};
|
||||
const int kWidth = 320;
|
||||
|
|
Loading…
Reference in a new issue