core/linphone/ffmpeg-0.11.patch
2012-09-11 20:38:30 +00:00

60 lines
2.0 KiB
Diff

diff -Naur linphone-3.5.2/mediastreamer2/src/h264dec.c linphone-3.5.2.fixed/mediastreamer2/src/h264dec.c
--- linphone-3.5.2/mediastreamer2/src/h264dec.c 2012-02-22 11:54:58.000000000 +0000
+++ linphone-3.5.2.fixed/mediastreamer2/src/h264dec.c 2012-09-11 20:32:10.068323657 +0000
@@ -44,7 +44,6 @@
static void ffmpeg_init(){
static bool_t done=FALSE;
if (!done){
- avcodec_init();
avcodec_register_all();
done=TRUE;
}
diff -Naur linphone-3.5.2/mediastreamer2/src/videoenc.c linphone-3.5.2.fixed/mediastreamer2/src/videoenc.c
--- linphone-3.5.2/mediastreamer2/src/videoenc.c 2012-02-22 11:54:58.000000000 +0000
+++ linphone-3.5.2.fixed/mediastreamer2/src/videoenc.c 2012-09-11 20:31:57.498124431 +0000
@@ -53,7 +53,6 @@
void ms_ffmpeg_check_init(){
if(!avcodec_initialized){
- avcodec_init();
avcodec_register_all();
avcodec_initialized=TRUE;
#ifdef ENABLE_LOG_FFMPEG
@@ -300,9 +299,7 @@
if (s->profile==0){
s->codec=CODEC_ID_H263;
}else{
- c->flags|=CODEC_FLAG_H263P_UMV;
c->flags|=CODEC_FLAG_AC_PRED;
- c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
/*
c->flags|=CODEC_FLAG_OBMC;
c->flags|=CODEC_FLAG_AC_PRED;
@@ -372,7 +369,7 @@
// assume video size is CIF or QCIF
if (context->width == 352 && context->height == 288) header->b_wptr[1] = 0x60;
else header->b_wptr[1] = 0x40;
- if (context->coded_frame->pict_type != FF_I_TYPE) header->b_wptr[1] |= 0x10;
+ if (context->coded_frame->pict_type != AV_PICTURE_TYPE_I) header->b_wptr[1] |= 0x10;
header->b_wptr += 4;
header->b_cont = *packet;
*packet = header;
@@ -779,7 +776,7 @@
s->req_vfu=TRUE;
}
if (s->req_vfu){
- pict.pict_type=FF_I_TYPE;
+ pict.pict_type=AV_PICTURE_TYPE_I;
s->req_vfu=FALSE;
}
comp_buf->b_rptr=comp_buf->b_wptr=comp_buf->b_datap->db_base;
@@ -799,7 +796,7 @@
if (s->framenum==1){
video_starter_first_frame (&s->starter,f->ticker->time);
}
- if (c->coded_frame->pict_type==FF_I_TYPE){
+ if (c->coded_frame->pict_type==AV_PICTURE_TYPE_I){
ms_message("Emitting I-frame");
}
comp_buf->b_wptr+=error;