summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-11 04:23:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-11 04:23:25 +0200
commit3602ad7ee6fe5caa402e61aa04ac695e1c46fe5e (patch)
tree5d89faee8784c9f755974a0822a3e9e90673494e /libavcodec/mpegvideo_enc.c
parent3b2d285afbd6304505a96b71877cdfda13f4565c (diff)
parent142e76f1055de5dde44696e71a5f63f2cb11dedf (diff)
Merge commit '142e76f1055de5dde44696e71a5f63f2cb11dedf'
* commit '142e76f1055de5dde44696e71a5f63f2cb11dedf': swscale: fix crash with dithering due incorrect offset calculation. matroskadec: fix stupid typo (!= -> ==) build: remove duplicates from order-only directory prerequisite list build: rework rules for things in the tools dir configure: fix --cpu=host with gcc 4.6 ARM: use const macro to define constant data in asm bitdepth: simplify FUNC/FUNCC macros dsputil: remove ff_emulated_edge_mc macro used in one place 9/10-bit: simplify clipping macros matroskadec: reindent matroskadec: defer parsing of cues element until we seek. lavc: add support for codec-specific defaults. lavc: make avcodec_alloc_context3 officially public. lavc: remove a half-working attempt at different defaults for audio/video codecs. ac3dec: add a drc_scale private option lavf: add avformat_find_stream_info() lavc: introduce avcodec_open2() as a replacement for avcodec_open(). Conflicts: Makefile libavcodec/utils.c libavformat/avformat.h libswscale/swscale_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d32b9e63fb..4c47d41808 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -944,7 +944,7 @@ static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){
static int estimate_best_b_count(MpegEncContext *s){
AVCodec *codec= avcodec_find_encoder(s->avctx->codec_id);
- AVCodecContext *c= avcodec_alloc_context();
+ AVCodecContext *c = avcodec_alloc_context3(NULL);
AVFrame input[FF_MAX_B_FRAMES+2];
const int scale= s->avctx->brd_scale;
int i, j, out_size, p_lambda, b_lambda, lambda2;
@@ -973,7 +973,7 @@ static int estimate_best_b_count(MpegEncContext *s){
c->time_base= s->avctx->time_base;
c->max_b_frames= s->max_b_frames;
- if (avcodec_open(c, codec) < 0)
+ if (avcodec_open2(c, codec, NULL) < 0)
return -1;
for(i=0; i<s->max_b_frames+2; i++){