Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11789bb

Browse files
author
Clement Champetier
committed
frames: rename local variables to log messages
1 parent93ce328 commit11789bb

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

‎src/AvTranscoder/data/decoded/AudioFrame.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ void AudioFrame::allocateData()
113113
if(ret <0)
114114
{
115115
const std::string formatName =getSampleFormatName(_desc._sampleFormat);
116-
std::stringstreamstream;
117-
stream <<"Unable to allocate an audio frame of";
118-
stream <<"sample rate =" << _frame->sample_rate <<",";
119-
stream <<"nb channels =" << _frame->channels <<",";
120-
stream <<"channel layout =" <<av_get_channel_name(_frame->channels) <<",";
121-
stream <<"nb samples =" << _frame->nb_samples <<",";
122-
stream <<"sample format =" << (formatName.empty() ?"none" : formatName);
123-
LOG_ERROR(stream.str())
116+
std::stringstreammsg;
117+
msg <<"Unable to allocate an audio frame of";
118+
msg <<"sample rate =" << _frame->sample_rate <<",";
119+
msg <<"nb channels =" << _frame->channels <<",";
120+
msg <<"channel layout =" <<av_get_channel_name(_frame->channels) <<",";
121+
msg <<"nb samples =" << _frame->nb_samples <<",";
122+
msg <<"sample format =" << (formatName.empty() ?"none" : formatName);
123+
LOG_ERROR(msg.str())
124124
throwstd::bad_alloc();
125125
}
126126
_dataAllocated =true;
@@ -139,9 +139,9 @@ void AudioFrame::assignBuffer(const unsigned char* ptrValue)
139139
getNbSamplesPerChannel(),getSampleFormat(), align);
140140
if(ret <0)
141141
{
142-
std::stringstreamos;
143-
os <<"Unable to assign an audio buffer:" <<getDescriptionFromErrorCode(ret);
144-
throwstd::runtime_error(os.str());
142+
std::stringstreammsg;
143+
msg <<"Unable to assign an audio buffer:" <<getDescriptionFromErrorCode(ret);
144+
throwstd::runtime_error(msg.str());
145145
}
146146
}
147147

‎src/AvTranscoder/data/decoded/VideoFrame.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ void VideoFrame::allocateData()
9393
if(ret <0)
9494
{
9595
const std::string formatName =getPixelFormatName(_desc._pixelFormat);
96-
std::stringstreamstream;
97-
stream <<"Unable to allocate an image frame of";
98-
stream <<"width =" << _frame->width <<",";
99-
stream <<"height =" << _frame->height <<",";
100-
stream <<"pixel format =" << (formatName.empty() ?"none" : formatName);
101-
LOG_ERROR(stream.str())
96+
std::stringstreammsg;
97+
msg <<"Unable to allocate an image frame of";
98+
msg <<"width =" << _frame->width <<",";
99+
msg <<"height =" << _frame->height <<",";
100+
msg <<"pixel format =" << (formatName.empty() ?"none" : formatName);
101+
LOG_ERROR(msg.str())
102102
throwstd::bad_alloc();
103103
}
104104
_dataAllocated =true;
@@ -116,9 +116,9 @@ void VideoFrame::assignBuffer(const unsigned char* ptrValue)
116116
avpicture_fill(reinterpret_cast<AVPicture*>(_frame), ptrValue,getPixelFormat(),getWidth(),getHeight());
117117
if(ret <0)
118118
{
119-
std::stringstreamos;
120-
os <<"Unable to assign an image buffer of" <<getSize() <<" bytes:" <<getDescriptionFromErrorCode(ret);
121-
throwstd::runtime_error(os.str());
119+
std::stringstreammsg;
120+
msg <<"Unable to assign an image buffer of" <<getSize() <<" bytes:" <<getDescriptionFromErrorCode(ret);
121+
throwstd::runtime_error(msg.str());
122122
}
123123
}
124124
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp