35 fprintf(ret ? stderr : stdout,
36 "Usage: seek_print file [command ...]\n"
39 " seek:stream:min_ts:ts:max_ts:flags\n"
44 int main(
int argc,
char **argv)
49 int64_t min_ts, max_ts, ts;
52 while ((opt =
getopt(argc, argv,
"h")) != -1) {
70 fprintf(stderr,
"%s: %s\n", filename,
av_err2str(ret));
74 fprintf(stderr,
"%s: could not find codec parameters: %s\n", filename,
79 for (; argc; argc--, argv++) {
80 if (!strcmp(*argv,
"read")) {
83 printf(
"read: %d (%s)\n", ret,
av_err2str(ret));
86 printf(
"read: %d size=%d stream=%d dts=%s (%s) pts=%s (%s)\n",
92 }
else if (sscanf(*argv,
"seek:%i:%"SCNi64
":%"SCNi64
":%"SCNi64
":%i",
93 &stream, &min_ts, &ts, &max_ts, &flags) == 5) {
95 printf(
"seek: %d (%s)\n", ret,
av_err2str(ret));
97 fprintf(stderr,
"'%s': unknown command\n", *argv);