mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-05 06:40:03 +00:00
ffprobe: do not use deprecated AVStream.codec for max bitrate
Use the decoder context instead.
This commit is contained in:
parent
65b08aa19c
commit
cb789fd2b3
@ -2754,10 +2754,10 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
print_time("duration", stream->duration, &stream->time_base);
|
||||
if (par->bit_rate > 0) print_val ("bit_rate", par->bit_rate, unit_bit_per_second_str);
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
#if FF_API_LAVF_AVCTX
|
||||
if (stream->codec->rc_max_rate > 0) print_val ("max_bit_rate", stream->codec->rc_max_rate, unit_bit_per_second_str);
|
||||
else print_str_opt("max_bit_rate", "N/A");
|
||||
#endif
|
||||
if (dec_ctx && dec_ctx->rc_max_rate > 0)
|
||||
print_val ("max_bit_rate", dec_ctx->rc_max_rate, unit_bit_per_second_str);
|
||||
else
|
||||
print_str_opt("max_bit_rate", "N/A");
|
||||
if (dec_ctx && dec_ctx->bits_per_raw_sample > 0) print_fmt("bits_per_raw_sample", "%d", dec_ctx->bits_per_raw_sample);
|
||||
else print_str_opt("bits_per_raw_sample", "N/A");
|
||||
if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
|
||||
|
Loading…
Reference in New Issue
Block a user