mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
update to libvpx b46243d from repo https://chromium.googlesource.com/webm/libvpx
This commit is contained in:
@@ -29,19 +29,13 @@ static unsigned int MemGetLe32(const uint8_t *mem) {
|
||||
class IVFVideoSource : public CompressedVideoSource {
|
||||
public:
|
||||
explicit IVFVideoSource(const std::string &file_name)
|
||||
: file_name_(file_name),
|
||||
input_file_(NULL),
|
||||
compressed_frame_buf_(NULL),
|
||||
frame_sz_(0),
|
||||
frame_(0),
|
||||
end_of_file_(false) {
|
||||
}
|
||||
: file_name_(file_name), input_file_(NULL), compressed_frame_buf_(NULL),
|
||||
frame_sz_(0), frame_(0), end_of_file_(false) {}
|
||||
|
||||
virtual ~IVFVideoSource() {
|
||||
delete[] compressed_frame_buf_;
|
||||
|
||||
if (input_file_)
|
||||
fclose(input_file_);
|
||||
if (input_file_) fclose(input_file_);
|
||||
}
|
||||
|
||||
virtual void Init() {
|
||||
@@ -54,15 +48,16 @@ class IVFVideoSource : public CompressedVideoSource {
|
||||
virtual void Begin() {
|
||||
input_file_ = OpenTestDataFile(file_name_);
|
||||
ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: "
|
||||
<< file_name_;
|
||||
<< file_name_;
|
||||
|
||||
// Read file header
|
||||
uint8_t file_hdr[kIvfFileHdrSize];
|
||||
ASSERT_EQ(kIvfFileHdrSize, fread(file_hdr, 1, kIvfFileHdrSize, input_file_))
|
||||
<< "File header read failed.";
|
||||
// Check file header
|
||||
ASSERT_TRUE(file_hdr[0] == 'D' && file_hdr[1] == 'K' && file_hdr[2] == 'I'
|
||||
&& file_hdr[3] == 'F') << "Input is not an IVF file.";
|
||||
ASSERT_TRUE(file_hdr[0] == 'D' && file_hdr[1] == 'K' &&
|
||||
file_hdr[2] == 'I' && file_hdr[3] == 'F')
|
||||
<< "Input is not an IVF file.";
|
||||
|
||||
FillFrame();
|
||||
}
|
||||
@@ -76,8 +71,8 @@ class IVFVideoSource : public CompressedVideoSource {
|
||||
ASSERT_TRUE(input_file_ != NULL);
|
||||
uint8_t frame_hdr[kIvfFrameHdrSize];
|
||||
// Check frame header and read a frame from input_file.
|
||||
if (fread(frame_hdr, 1, kIvfFrameHdrSize, input_file_)
|
||||
!= kIvfFrameHdrSize) {
|
||||
if (fread(frame_hdr, 1, kIvfFrameHdrSize, input_file_) !=
|
||||
kIvfFrameHdrSize) {
|
||||
end_of_file_ = true;
|
||||
} else {
|
||||
end_of_file_ = false;
|
||||
|
Reference in New Issue
Block a user