Fixes regression of av_dump_format() Fixes part of Ticket 5444
Showing the changes to libavformat/dump.c (1 of 1 file). Show all
Unified · Split
| @@ -492,16 +492,19 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 491 unmodified lines | |||
| 492 | int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; | 492 | int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; |
| 493 | int tbr = st->r_frame_rate.den && st->r_frame_rate.num; | 493 | int tbr = st->r_frame_rate.den && st->r_frame_rate.num; |
| 494 | int tbn = st->time_base.den && st->time_base.num; | 494 | int tbn = st->time_base.den && st->time_base.num; |
| 495 | int tbc = st->codec->time_base.den && st->codec->time_base.num; | ||
| 495 | 496 | ||
| 496 | if (fps || tbr || tbn) | 497 | if (fps || tbr || tbn || tbc) |
| 497 | av_log(NULL, AV_LOG_INFO, "%s", separator); | 498 | av_log(NULL, AV_LOG_INFO, "%s", separator); |
| 498 | 499 | ||
| 499 | if (fps) | 500 | if (fps) |
| 500 | print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps"); | 501 | print_fps(av_q2d(st->avg_frame_rate), tbr || tbn || tbc ? "fps, " : "fps"); |
| 501 | if (tbr) | 502 | if (tbr) |
| 502 | print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr"); | 503 | print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr"); |
| 503 | if (tbn) | 504 | if (tbn) |
| 504 | print_fps(1 / av_q2d(st->time_base), "tbn"); | 505 | print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn"); |
| 506 | if (tbc) | ||
| 507 | print_fps(1 / av_q2d(st->codec->time_base), "tbc"); | ||
| 505 | } | 508 | } |
| 506 | 509 | ||
| 507 | if (st->disposition & AV_DISPOSITION_DEFAULT) | 510 | if (st->disposition & AV_DISPOSITION_DEFAULT) |