Commit f4b7da64 authored by Simon Morlat's avatar Simon Morlat
Browse files

ffmpeg integration fixes

parent cc3e2794
......@@ -40,7 +40,12 @@ int avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame
#ifndef HAVE_FUN_avcodec_get_context_defaults3 /**/
int avcodec_get_context_defaults3 (AVCodecContext *s, const AVCodec *codec) {
return avcodec_get_context_defaults(s);
avcodec_get_context_defaults(s);
return 0;
}
AVCodecContext *avcodec_alloc_context3(AVCodec *codec){
return avcodec_alloc_context();
}
#endif
......
......@@ -75,6 +75,7 @@ int avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame
#ifndef HAVE_FUN_avcodec_get_context_defaults3 /**/
int avcodec_get_context_defaults3 (AVCodecContext *s, const AVCodec *codec);
AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
#endif
#ifndef HAVE_FUN_avcodec_open2 /**/
......
......@@ -90,9 +90,9 @@ static void jpg_process(MSFilter *f){
mblk_t *jpegm;
struct SwsContext *sws_ctx;
struct AVPacket packet;
memset(&packet, 0, sizeof(packet));
AVCodecContext *avctx=avcodec_alloc_context3(s->codec);
AVCodecContext *avctx=avcodec_alloc_context3(NULL);
memset(&packet, 0, sizeof(packet));
avctx->width=yuvbuf.w;
avctx->height=yuvbuf.h;
......
......@@ -103,10 +103,7 @@ static const MSVideoConfiguration snow_conf_list[] = {
void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl)
{
static char message[8192];
vsnprintf(message, sizeof message, fmt, vl);
ms_message(message);
ortp_logv(ORTP_MESSAGE,fmt,vl);
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment