37 fprintf(ret ? stderr : stdout,
38 "Usage: seek_print file [command ...]\n"
41 " seek:stream:min_ts:ts:max_ts:flags\n"
46 int main(
int argc,
char **argv)
48 int opt, ret, stream,
flags;
51 int64_t min_ts, max_ts, ts;
54 while ((opt =
getopt(argc, argv,
"h")) != -1) {
72 fprintf(stderr,
"%s: %s\n", filename,
av_err2str(ret));
76 fprintf(stderr,
"%s: could not find codec parameters: %s\n", filename,
81 for (; argc; argc--, argv++) {
82 if (!strcmp(*argv,
"read")) {
85 printf(
"read: %d (%s)\n", ret,
av_err2str(ret));
88 printf(
"read: %d size=%d stream=%d dts=%s (%s) pts=%s (%s)\n",
94 }
else if (sscanf(*argv,
"seek:%i:%"PRIi64
":%"PRIi64
":%"PRIi64
":%i",
95 &stream, &min_ts, &ts, &max_ts, &flags) == 5) {
97 printf(
"seek: %d (%s)\n", ret,
av_err2str(ret));
99 fprintf(stderr,
"'%s': unknown command\n", *argv);