(f)printf() is disallowed in libavcodec, compilation will fail now if its used, except that codecs which where added after the printf->av_log change which did ignore av_log() and used prinf are now silent and wont print anything, they should be changed to use av_log, i could do that, but its better if the orginal developer decides which AV_LOG level each message should get
Originally committed as revision 2806 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define HAVE_AV_CONFIG_H
|
#define HAVE_AV_CONFIG_H
|
||||||
#include "common.h"
|
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include "cmdutils.h"
|
#include "cmdutils.h"
|
||||||
|
|
||||||
|
@ -1156,21 +1156,23 @@ static inline long long rdtsc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define START_TIMER \
|
#define START_TIMER \
|
||||||
static uint64_t tsum=0;\
|
|
||||||
static int tcount=0;\
|
|
||||||
static int tskip_count=0;\
|
|
||||||
uint64_t tend;\
|
uint64_t tend;\
|
||||||
uint64_t tstart= rdtsc();\
|
uint64_t tstart= rdtsc();\
|
||||||
|
|
||||||
#define STOP_TIMER(id) \
|
#define STOP_TIMER(id) \
|
||||||
tend= rdtsc();\
|
tend= rdtsc();\
|
||||||
if(tcount<2 || tend - tstart < 8*tsum/tcount){\
|
{\
|
||||||
tsum+= tend - tstart;\
|
static uint64_t tsum=0;\
|
||||||
tcount++;\
|
static int tcount=0;\
|
||||||
}else\
|
static int tskip_count=0;\
|
||||||
tskip_count++;\
|
if(tcount<2 || tend - tstart < 8*tsum/tcount){\
|
||||||
if(256*256*256*64%(tcount+tskip_count)==0){\
|
tsum+= tend - tstart;\
|
||||||
fprintf(stderr, "%Ld dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
|
tcount++;\
|
||||||
|
}else\
|
||||||
|
tskip_count++;\
|
||||||
|
if(256*256*256*64%(tcount+tskip_count)==0){\
|
||||||
|
av_log(NULL, AV_LOG_DEBUG, "%Ld dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
|
||||||
|
}\
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1180,6 +1182,10 @@ if(256*256*256*64%(tcount+tskip_count)==0){\
|
|||||||
#define malloc please_use_av_malloc
|
#define malloc please_use_av_malloc
|
||||||
#define free please_use_av_free
|
#define free please_use_av_free
|
||||||
#define realloc please_use_av_realloc
|
#define realloc please_use_av_realloc
|
||||||
|
#if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H))
|
||||||
|
#define printf please_use_av_log
|
||||||
|
#define fprintf please_use_av_log
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CHECKED_ALLOCZ(p, size)\
|
#define CHECKED_ALLOCZ(p, size)\
|
||||||
{\
|
{\
|
||||||
|
@ -403,7 +403,7 @@ static int rv20_decode_picture_header(MpegEncContext *s)
|
|||||||
s->time= seq;
|
s->time= seq;
|
||||||
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
|
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
|
||||||
if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
|
if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
|
||||||
printf("messed up order, seeking?, skiping current b frame\n");
|
av_log(s->avctx, AV_LOG_DEBUG, "messed up order, seeking?, skiping current b frame\n");
|
||||||
return FRAME_SKIPED;
|
return FRAME_SKIPED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
|
#define printf(...) {} //(f)printf() usage is forbidden in libavcodec, use av_log
|
||||||
|
#define fprintf(...) {}
|
||||||
|
|
||||||
#define CPAIR 2
|
#define CPAIR 2
|
||||||
#define CQUAD 4
|
#define CQUAD 4
|
||||||
#define COCTET 8
|
#define COCTET 8
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
|
#define printf(...) {} //(f)printf() usage is forbidden in libavcodec, use av_log
|
||||||
|
#define fprintf(...) {}
|
||||||
|
|
||||||
#include "truemotion1data.h"
|
#include "truemotion1data.h"
|
||||||
|
|
||||||
#define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
|
#define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
|
||||||
|
@ -832,8 +832,10 @@ static void av_log_default_callback(AVCodecContext* avctx, int level, const char
|
|||||||
|
|
||||||
if(level>av_log_level)
|
if(level>av_log_level)
|
||||||
return;
|
return;
|
||||||
|
#undef fprintf
|
||||||
if(avctx && print_prefix)
|
if(avctx && print_prefix)
|
||||||
fprintf(stderr, "[%s @ %p]", avctx->codec ? avctx->codec->name : "?", avctx);
|
fprintf(stderr, "[%s @ %p]", avctx->codec ? avctx->codec->name : "?", avctx);
|
||||||
|
#define fprintf please_use_av_log
|
||||||
|
|
||||||
print_prefix= strstr(fmt, "\n") != NULL;
|
print_prefix= strstr(fmt, "\n") != NULL;
|
||||||
|
|
||||||
|
@ -45,6 +45,9 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
|
#define printf(...) {} //(f)printf() usage is forbidden in libavcodec, use av_log
|
||||||
|
#define fprintf(...) {}
|
||||||
|
|
||||||
#define VMD_HEADER_SIZE 0x330
|
#define VMD_HEADER_SIZE 0x330
|
||||||
#define PALETTE_COUNT 256
|
#define PALETTE_COUNT 256
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "framehook.h"
|
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include "framehook.h"
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_DLFCN
|
#ifdef CONFIG_HAVE_DLFCN
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
Reference in New Issue
Block a user