X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=fftools%2Fffprobe.c;h=544786ec728aec22c1f04eaeda95f47fbbe97c73;hb=0e9c01fd87ae6cc5ba3474810eaa3c58499615ce;hp=967adbe30cd8ff557cb25adfa1307a5743981a5e;hpb=d23fff0d8a0e7df170c67a9dd5c1f7c1fc0da489;p=ffmpeg diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 967adbe30cd..544786ec728 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2275,7 +2275,8 @@ static av_always_inline int process_frame(WriterContext *w, break; case AVMEDIA_TYPE_SUBTITLE: - ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt); + if (*packet_new) + ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt); *packet_new = 0; break; default: @@ -2370,11 +2371,11 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile, goto end; } while (!av_read_frame(fmt_ctx, &pkt)) { - if (ifile->nb_streams > nb_streams) { + if (fmt_ctx->nb_streams > nb_streams) { REALLOCZ_ARRAY_STREAM(nb_streams_frames, nb_streams, fmt_ctx->nb_streams); REALLOCZ_ARRAY_STREAM(nb_streams_packets, nb_streams, fmt_ctx->nb_streams); REALLOCZ_ARRAY_STREAM(selected_streams, nb_streams, fmt_ctx->nb_streams); - nb_streams = ifile->nb_streams; + nb_streams = fmt_ctx->nb_streams; } if (selected_streams[pkt.stream_index]) { AVRational tb = ifile->streams[pkt.stream_index].st->time_base; @@ -2520,7 +2521,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id #endif print_int("has_b_frames", par->video_delay); sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL); - if (sar.den) { + if (sar.num) { print_q("sample_aspect_ratio", sar, ':'); av_reduce(&dar.num, &dar.den, par->width * sar.num, @@ -3117,7 +3118,9 @@ static void ffprobe_show_pixel_formats(WriterContext *w) PRINT_PIX_FMT_FLAG(HWACCEL, "hwaccel"); PRINT_PIX_FMT_FLAG(PLANAR, "planar"); PRINT_PIX_FMT_FLAG(RGB, "rgb"); +#if FF_API_PSEUDOPAL PRINT_PIX_FMT_FLAG(PSEUDOPAL, "pseudopal"); +#endif PRINT_PIX_FMT_FLAG(ALPHA, "alpha"); writer_print_section_footer(w); } @@ -3566,7 +3569,6 @@ int main(int argc, char **argv) options = real_options; parse_loglevel(argc, argv, options); - av_register_all(); avformat_network_init(); init_opts(); #if CONFIG_AVDEVICE