diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-08-26 20:14:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-08-26 20:14:28 +0000 |
commit | 22ddd60bc247c7487b4e91416d18da712415630a (patch) | |
tree | fcd6da64a474197e793bb91e4248bad0a81c51c4 /libavcodec/mpegvideo.c | |
parent | 922bc38d55995536e84db1b704fdccc140870d26 (diff) | |
download | ffmpeg-22ddd60bc247c7487b4e91416d18da712415630a.tar.gz |
fixing CODEC_FLAG_GLOBAL_HEADER
Originally committed as revision 2167 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f675d1cd53..ffd71a69be 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -549,7 +549,7 @@ void MPV_common_end(MpegEncContext *s) int MPV_encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - int i; + int i, dummy; int chroma_h_shift, chroma_v_shift; avctx->pix_fmt = PIX_FMT_YUV420P; // FIXME @@ -646,6 +646,9 @@ int MPV_encode_init(AVCodecContext *avctx) avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift); + av_reduce(&s->time_increment_resolution, &dummy, s->avctx->frame_rate, s->avctx->frame_rate_base, (1<<16)-1); + s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1; + switch(avctx->codec->id) { case CODEC_ID_MPEG1VIDEO: s->out_format = FMT_MPEG1; @@ -872,6 +875,8 @@ int MPV_encode_end(AVCodecContext *avctx) MPV_common_end(s); if (s->out_format == FMT_MJPEG) mjpeg_close(s); + + av_freep(&avctx->extradata); return 0; } |