File linphone-ffmpeg.patch of Package linphone
diff -urN linphone-3.5.2.orig/mediastreamer2/src/h264dec.c linphone-3.5.2/mediastreamer2/src/h264dec.c
--- linphone-3.5.2.orig/mediastreamer2/src/h264dec.c 2012-02-22 18:54:58.000000000 +0700
+++ linphone-3.5.2/mediastreamer2/src/h264dec.c 2012-10-11 09:29:58.229247989 +0700
@@ -44,7 +44,6 @@
static void ffmpeg_init(){
static bool_t done=FALSE;
if (!done){
- avcodec_init();
avcodec_register_all();
done=TRUE;
}
diff -urN linphone-3.5.2.orig/mediastreamer2/src/videoenc.c linphone-3.5.2/mediastreamer2/src/videoenc.c
--- linphone-3.5.2.orig/mediastreamer2/src/videoenc.c 2012-02-22 18:54:58.000000000 +0700
+++ linphone-3.5.2/mediastreamer2/src/videoenc.c 2012-10-11 09:36:46.770805574 +0700
@@ -37,6 +37,13 @@
#define RATE_CONTROL_MARGIN 15000 /*bits/second*/
+#ifndef CODEC_FLAG_H263P_UMV
+#define CODEC_FLAG_H263P_UMV 0x02000000
+#endif
+#ifndef CODEC_FLAG_H263P_SLICE_STRUCT
+#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
+#endif
+
static bool_t avcodec_initialized=FALSE;
#ifdef ENABLE_LOG_FFMPEG
@@ -53,7 +60,6 @@
void ms_ffmpeg_check_init(){
if(!avcodec_initialized){
- avcodec_init();
avcodec_register_all();
avcodec_initialized=TRUE;
#ifdef ENABLE_LOG_FFMPEG
@@ -372,7 +378,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 +785,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 +805,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;