X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=fftools%2Fffprobe.c;h=967adbe30cd8ff557cb25adfa1307a5743981a5e;hb=35347e7e9b2769166ce99cd4c4789dcf2ac463a9;hp=07ca842efa319f00319986b91894b0dd3f714c39;hpb=a629bc99fd111f9275c1e3b54dc358efeeae18d9;p=ffmpeg diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 07ca842efa3..967adbe30cd 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2512,10 +2512,12 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id case AVMEDIA_TYPE_VIDEO: print_int("width", par->width); print_int("height", par->height); +#if FF_API_LAVF_AVCTX if (dec_ctx) { print_int("coded_width", dec_ctx->coded_width); print_int("coded_height", dec_ctx->coded_height); } +#endif print_int("has_b_frames", par->video_delay); sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL); if (sar.den) { @@ -2778,7 +2780,7 @@ static int show_format(WriterContext *w, InputFile *ifile) int ret = 0; writer_print_section_header(w, SECTION_ID_FORMAT); - print_str_validate("filename", fmt_ctx->filename); + print_str_validate("filename", fmt_ctx->url); print_int("nb_streams", fmt_ctx->nb_streams); print_int("nb_programs", fmt_ctx->nb_programs); print_str("format_name", fmt_ctx->iformat->name); @@ -2910,8 +2912,12 @@ static int open_input_file(InputFile *ifile, const char *filename) av_dict_set(&codec_opts, "threads", "1", 0); } - av_codec_set_pkt_timebase(ist->dec_ctx, stream->time_base); + ist->dec_ctx->pkt_timebase = stream->time_base; ist->dec_ctx->framerate = stream->avg_frame_rate; +#if FF_API_LAVF_AVCTX + ist->dec_ctx->coded_width = stream->codec->coded_width; + ist->dec_ctx->coded_height = stream->codec->coded_height; +#endif if (avcodec_open2(ist->dec_ctx, codec, &opts) < 0) { av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",