Browse Source

avplay: Don't try to scale timestamps if the tb isn't set

If get_filtered_video_frame failed above, tb might not be
initialized at all, so don't scale using it.

This fixes cases where avplay could crash if aborting
avformat_find_stream_info with ctrl+c.

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n0.11
Martin Storsjö 13 years ago
parent
commit
951e715ceb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      avplay.c

+ 1
- 1
avplay.c View File

@@ -1796,7 +1796,7 @@ static int video_thread(void *arg)
frame->opaque = picref; frame->opaque = picref;
} }


if (av_cmp_q(tb, is->video_st->time_base)) {
if (ret >= 0 && av_cmp_q(tb, is->video_st->time_base)) {
av_unused int64_t pts1 = pts_int; av_unused int64_t pts1 = pts_int;
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base); pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
av_dlog(NULL, "video_thread(): " av_dlog(NULL, "video_thread(): "


Loading…
Cancel
Save