diff options
author | wm4 <wm4@nowhere> | 2014-07-22 23:04:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-22 23:04:12 +0200 |
commit | 63373ca424f5eaef50a797b7bc7f6c395ed23331 (patch) | |
tree | 7c889c89ef6dabc83b0cf05da744f2b52b27faa0 /common | |
parent | 104185052362fc196e4dd676b72f092ff63c6ba2 (diff) | |
download | mpv-63373ca424f5eaef50a797b7bc7f6c395ed23331.tar.bz2 mpv-63373ca424f5eaef50a797b7bc7f6c395ed23331.tar.xz |
encode: deal with codec->time_base deprecation
This seems to work with both Libav 10 and FFmpeg d3e51b41.
Diffstat (limited to 'common')
-rw-r--r-- | common/encode_lavc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/encode_lavc.c b/common/encode_lavc.c index df5710e07a..8877033f8d 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -590,11 +590,8 @@ AVStream *encode_lavc_alloc_stream(struct encode_lavc_context *ctx, } avcodec_get_context_defaults3(stream->codec, ctx->vc); - // stream->time_base = ctx->timebase; - // doing this breaks mpeg2ts in ffmpeg - // which doesn't properly force the time base to be 90000 - // furthermore, ffmpeg.c doesn't do this either and works - + // Using codec->time_base is deprecated, but needed for older lavf. + stream->time_base = ctx->timebase; stream->codec->time_base = ctx->timebase; ctx->voptions = NULL; @@ -626,6 +623,8 @@ AVStream *encode_lavc_alloc_stream(struct encode_lavc_context *ctx, } avcodec_get_context_defaults3(stream->codec, ctx->ac); + // Using codec->time_base is deprecated, but needed for older lavf. + stream->time_base = ctx->timebase; stream->codec->time_base = ctx->timebase; ctx->aoptions = NULL; |