[FFmpeg-cvslog] librtmp: don't abuse a variable for two unrelated things.
Anton Khirnov
git at videolan.org
Mon Jun 4 00:38:43 CEST 2012
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Jun 3 10:09:03 2012 +0200| [a91943bcef8c0220e43dcc52007249aa2b1a78a3] | committer: Anton Khirnov
librtmp: don't abuse a variable for two unrelated things.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a91943bcef8c0220e43dcc52007249aa2b1a78a3
---
libavformat/librtmp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 4641c5d..883ecdf 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -81,19 +81,19 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
{
LibRTMPContext *ctx = s->priv_data;
RTMP *r = &ctx->rtmp;
- int rc = 0;
+ int rc = 0, level;
char *filename = s->filename;
switch (av_log_get_level()) {
default:
- case AV_LOG_FATAL: rc = RTMP_LOGCRIT; break;
- case AV_LOG_ERROR: rc = RTMP_LOGERROR; break;
- case AV_LOG_WARNING: rc = RTMP_LOGWARNING; break;
- case AV_LOG_INFO: rc = RTMP_LOGINFO; break;
- case AV_LOG_VERBOSE: rc = RTMP_LOGDEBUG; break;
- case AV_LOG_DEBUG: rc = RTMP_LOGDEBUG2; break;
+ case AV_LOG_FATAL: level = RTMP_LOGCRIT; break;
+ case AV_LOG_ERROR: level = RTMP_LOGERROR; break;
+ case AV_LOG_WARNING: level = RTMP_LOGWARNING; break;
+ case AV_LOG_INFO: level = RTMP_LOGINFO; break;
+ case AV_LOG_VERBOSE: level = RTMP_LOGDEBUG; break;
+ case AV_LOG_DEBUG: level = RTMP_LOGDEBUG2; break;
}
- RTMP_LogSetLevel(rc);
+ RTMP_LogSetLevel(level);
RTMP_LogSetCallback(rtmp_log);
if (ctx->app || ctx->playpath) {
More information about the ffmpeg-cvslog
mailing list