37 case AVERROR(EIO):
return "-EIO";
38 case AVERROR(ENOMEM):
return "-ENOMEM";
39 case AVERROR(EINVAL):
return "-EINVAL";
49 strcpy(buffer,
" NOPTS ");
53 snprintf(buffer, 60,
"%c%"PRId64
".%06"PRId64
"", ts<0 ?
'-' :
' ',
FFABS(ts)/1000000,
FFABS(ts)%1000000);
56 int main(
int argc,
char **argv)
60 int i,
ret, stream_id;
69 for(i=2; i<argc; i+=2){
70 if (!strcmp(argv[i],
"-seekforw")){
71 seekfirst = atoi(argv[i+1]);
72 }
else if(!strcmp(argv[i],
"-seekback")){
73 seekfirst = atoi(argv[i+1]);
75 }
else if(!strcmp(argv[i],
"-frames")){
76 frame_count = atoi(argv[i+1]);
77 }
else if(!strcmp(argv[i],
"-duration")){
78 duration = atoi(argv[i+1]);
85 av_dict_set(&format_opts,
"sample_rate",
"22050", 0);
91 printf(
"usage: %s input_file\n"
101 fprintf(stderr,
"cannot open %s\n", filename);
107 fprintf(stderr,
"%s: could not find codec parameters\n", filename);
128 printf(
"ret:%-10s st:%2d flags:%d dts:%s pts:%s pos:%7" PRId64
" size:%6d",
ret_str(ret), pkt.
stream_index, pkt.
flags, dts_buf, ts_buf, pkt.
pos, pkt.
size);
131 printf(
"ret:%s",
ret_str(ret));
147 ts_str(ts_buf, timestamp, stream_id < 0 ? AV_TIME_BASE_Q : st->time_base);
148 printf(
"ret:%-10s st:%2d flags:%d ts:%s\n",
ret_str(ret), stream_id, i&1, ts_buf);