Skip to content

Commit

Permalink
print the pts of each frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhuster committed Feb 20, 2017
1 parent 653751a commit 4d0476f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -3099,6 +3099,13 @@ static int read_thread(void *arg)
continue;
} else {
is->eof = 0;
if (pkt->stream_index == is->audio_stream) {
av_log(NULL, AV_LOG_VERBOSE, "read audio frame, pts: %lld\n", pkt->pts);
} else if (pkt->stream_index == is->video_stream) {
av_log(NULL, AV_LOG_VERBOSE, "read video frame, pts: %lld\n", pkt->pts);
} else {
av_log(NULL, AV_LOG_VERBOSE, "read packet unknown !\n");
}
}
/* check if packet is in play range specified by user, then queue, otherwise discard */
stream_start_time = ic->streams[pkt->stream_index]->start_time;
Expand Down

1 comment on commit 4d0476f

@CFM880
Copy link

@CFM880 CFM880 commented on 4d0476f May 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chengfangming@localhost:~$ ffprobe -show_entries  packet=dts,stream_index -i <地址>

用命令的话,这样也是可以的,省去编译的麻烦

Please sign in to comment.