I420VideoFrame: Remove functions set_width, set_height, and ResetSize
The functions set_width, set_height, and ResetSize in I420VideoFrame are not needed and just add complexity. R=perkj@webrtc.org, stefan@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39939004 Cr-Commit-Position: refs/heads/master@{#8434} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8434 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -511,7 +511,6 @@ int32_t VideoFilePlayerImpl::GetVideoFromFile(I420VideoFrame& videoFrame)
|
||||
// No new video data read from file.
|
||||
if(_encodedData.payloadSize == 0)
|
||||
{
|
||||
videoFrame.ResetSize();
|
||||
return -1;
|
||||
}
|
||||
int32_t retVal = 0;
|
||||
|
||||
@ -63,7 +63,6 @@ int32_t VideoCoder::SetDecodeCodec(VideoCodec& videoCodecInst,
|
||||
int32_t VideoCoder::Decode(I420VideoFrame& decodedVideo,
|
||||
const EncodedVideoData& encodedData)
|
||||
{
|
||||
decodedVideo.ResetSize();
|
||||
if(encodedData.payloadSize <= 0)
|
||||
{
|
||||
return -1;
|
||||
|
||||
@ -93,10 +93,7 @@ int32_t VideoFramesQueue::ReturnFrame(I420VideoFrame* ptrOldFrame) {
|
||||
// No need to reuse texture frames because they do not allocate memory.
|
||||
if (ptrOldFrame->native_handle() == NULL) {
|
||||
ptrOldFrame->set_timestamp(0);
|
||||
ptrOldFrame->set_width(0);
|
||||
ptrOldFrame->set_height(0);
|
||||
ptrOldFrame->set_render_time_ms(0);
|
||||
ptrOldFrame->ResetSize();
|
||||
_emptyFrames.push_back(ptrOldFrame);
|
||||
} else {
|
||||
delete ptrOldFrame;
|
||||
|
||||
Reference in New Issue
Block a user