Mercurial > libavformat.hg
comparison utils.c @ 2658:8b0fbab56ea2 libavformat
100l, fix dump_format, declare buf in dump_stream_format, sizeof(buf) is 4 because buf is char* since r10818
author | bcoudurier |
---|---|
date | Sun, 21 Oct 2007 23:10:15 +0000 |
parents | 4e3d38c8896c |
children | 1995444f6267 |
comparison
equal
deleted
inserted
replaced
2657:7efaa7166cb1 | 2658:8b0fbab56ea2 |
---|---|
2506 return; | 2506 return; |
2507 } | 2507 } |
2508 } | 2508 } |
2509 | 2509 |
2510 /* "user interface" functions */ | 2510 /* "user interface" functions */ |
2511 static void dump_stream_format(AVFormatContext *ic, int i, int index, char *buf, int is_output) | 2511 static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) |
2512 { | 2512 { |
2513 char buf[256]; | |
2513 int flags = (is_output ? ic->oformat->flags : ic->iformat->flags); | 2514 int flags = (is_output ? ic->oformat->flags : ic->iformat->flags); |
2514 AVStream *st = ic->streams[i]; | 2515 AVStream *st = ic->streams[i]; |
2515 int g = ff_gcd(st->time_base.num, st->time_base.den); | 2516 int g = ff_gcd(st->time_base.num, st->time_base.den); |
2516 avcodec_string(buf, sizeof(buf), st->codec, is_output); | 2517 avcodec_string(buf, sizeof(buf), st->codec, is_output); |
2517 av_log(NULL, AV_LOG_INFO, " Stream #%d.%d", index, i); | 2518 av_log(NULL, AV_LOG_INFO, " Stream #%d.%d", index, i); |
2538 int index, | 2539 int index, |
2539 const char *url, | 2540 const char *url, |
2540 int is_output) | 2541 int is_output) |
2541 { | 2542 { |
2542 int i, flags; | 2543 int i, flags; |
2543 char buf[256]; | |
2544 | 2544 |
2545 av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n", | 2545 av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n", |
2546 is_output ? "Output" : "Input", | 2546 is_output ? "Output" : "Input", |
2547 index, | 2547 index, |
2548 is_output ? ic->oformat->name : ic->iformat->name, | 2548 is_output ? ic->oformat->name : ic->iformat->name, |
2583 for(j=0; j<ic->nb_programs; j++) { | 2583 for(j=0; j<ic->nb_programs; j++) { |
2584 av_log(NULL, AV_LOG_INFO, " Program %d", ic->programs[j]->id); | 2584 av_log(NULL, AV_LOG_INFO, " Program %d", ic->programs[j]->id); |
2585 if(ic->programs[j]->name) | 2585 if(ic->programs[j]->name) |
2586 av_log(NULL, AV_LOG_INFO, " \"%s\"\n", ic->programs[j]->name); | 2586 av_log(NULL, AV_LOG_INFO, " \"%s\"\n", ic->programs[j]->name); |
2587 for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) | 2587 for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) |
2588 dump_stream_format(ic, ic->programs[j]->stream_index[k], index, buf, is_output); | 2588 dump_stream_format(ic, ic->programs[j]->stream_index[k], index, is_output); |
2589 } | 2589 } |
2590 } else | 2590 } else |
2591 for(i=0;i<ic->nb_streams;i++) | 2591 for(i=0;i<ic->nb_streams;i++) |
2592 dump_stream_format(ic, i, index, buf, is_output); | 2592 dump_stream_format(ic, i, index, is_output); |
2593 } | 2593 } |
2594 | 2594 |
2595 int parse_image_size(int *width_ptr, int *height_ptr, const char *str) | 2595 int parse_image_size(int *width_ptr, int *height_ptr, const char *str) |
2596 { | 2596 { |
2597 return av_parse_video_frame_size(width_ptr, height_ptr, str); | 2597 return av_parse_video_frame_size(width_ptr, height_ptr, str); |