diff options
author | James Almer <jamrial@gmail.com> | 2017-11-13 00:10:21 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-15 01:14:22 -0300 |
commit | e9025beacb86dd4390a8448fb38671699d40e24c (patch) | |
tree | c83d241888a31a230eb1fe0394981c583a9310bb /fftools | |
parent | c4131a0613c4b2c30c01b2550b41068815d27799 (diff) | |
download | ffmpeg-streaming-e9025beacb86dd4390a8448fb38671699d40e24c.zip ffmpeg-streaming-e9025beacb86dd4390a8448fb38671699d40e24c.tar.gz |
ffmpeg: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 2 | ||||
-rw-r--r-- | fftools/ffmpeg_opt.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index db391f7..babd85f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2877,7 +2877,7 @@ static int init_input_stream(int ist_index, char *error, int error_len) /* Useful for subtitles retiming by lavf (FIXME), skipping samples in * audio, and video decoders such as cuvid or mediacodec */ - av_codec_set_pkt_timebase(ist->dec_ctx, ist->st->time_base); + ist->dec_ctx->pkt_timebase = ist->st->time_base; if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0)) av_dict_set(&ist->decoder_opts, "threads", "auto", 0); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index e50895e..47d3841 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -794,8 +794,8 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) if(!ist->dec) ist->dec = avcodec_find_decoder(par->codec_id); #if FF_API_LOWRES - if (av_codec_get_lowres(st->codec)) { - av_codec_set_lowres(ist->dec_ctx, av_codec_get_lowres(st->codec)); + if (st->codec->lowres) { + ist->dec_ctx->lowres = st->codec->lowres; ist->dec_ctx->width = st->codec->width; ist->dec_ctx->height = st->codec->height; ist->dec_ctx->coded_width = st->codec->coded_width; @@ -1663,7 +1663,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in av_log(NULL, AV_LOG_FATAL, "Could not allocate memory for intra matrix.\n"); exit_program(1); } - av_codec_set_chroma_intra_matrix(video_enc, p); + video_enc->chroma_intra_matrix = p; parse_matrix_coeffs(p, chroma_intra_matrix); } MATCH_PER_STREAM_OPT(inter_matrices, str, inter_matrix, oc, st); |