Mercurial > mplayer.hg
comparison libmpcodecs/vd_ffmpeg.c @ 31541:0ccd18ec15c3
Fix ffmpeg logging: mp_msg_test must be called after the proper target
was detemined.
author | reimar |
---|---|
date | Thu, 01 Jul 2010 20:43:20 +0000 |
parents | 9f934200bf9e |
children | 45966266392b |
comparison
equal
deleted
inserted
replaced
31540:7f1c8212e3cf | 31541:0ccd18ec15c3 |
---|---|
187 case AV_LOG_INFO : mp_level= MSGL_INFO; break; | 187 case AV_LOG_INFO : mp_level= MSGL_INFO; break; |
188 case AV_LOG_ERROR: mp_level= MSGL_ERR ; break; | 188 case AV_LOG_ERROR: mp_level= MSGL_ERR ; break; |
189 default : mp_level= MSGL_ERR ; break; | 189 default : mp_level= MSGL_ERR ; break; |
190 } | 190 } |
191 | 191 |
192 if (!mp_msg_test(type, mp_level)) return; | |
193 | |
194 if(ptr){ | 192 if(ptr){ |
195 if(!strcmp(avc->class_name, "AVCodecContext")){ | 193 if(!strcmp(avc->class_name, "AVCodecContext")){ |
196 AVCodecContext *s= ptr; | 194 AVCodecContext *s= ptr; |
197 if(s->codec){ | 195 if(s->codec){ |
198 if(s->codec->type == CODEC_TYPE_AUDIO){ | 196 if(s->codec->type == CODEC_TYPE_AUDIO){ |
212 else if(s->oformat) | 210 else if(s->oformat) |
213 type= MSGT_MUXER; | 211 type= MSGT_MUXER; |
214 #endif | 212 #endif |
215 } | 213 } |
216 } | 214 } |
215 | |
216 if (!mp_msg_test(type, mp_level)) return; | |
217 | 217 |
218 if(print_prefix && avc) { | 218 if(print_prefix && avc) { |
219 mp_msg(type, mp_level, "[%s @ %p]", avc->item_name(ptr), avc); | 219 mp_msg(type, mp_level, "[%s @ %p]", avc->item_name(ptr), avc); |
220 } | 220 } |
221 | 221 |