| @@ -253,8 +253,9 @@ typedef struct InputFile { · 252 unmodified lines |
| 253 | int eof_reached; /* true if eof reached */ | 253 | int eof_reached; /* true if eof reached */ |
| 254 | int ist_index; /* index of first stream in ist_table */ | 254 | int ist_index; /* index of first stream in ist_table */ |
| 255 | int buffer_size; /* current total buffer size */ | 255 | int buffer_size; /* current total buffer size */ |
| 256 | int nb_streams; | | |
| 257 | int64_t ts_offset; | 256 | int64_t ts_offset; |
| | 257 | int nb_streams; /* number of stream that avconv is aware of; may be different |
| | 258 | from ctx.nb_streams if new streams appear during av_read_frame() */ |
| 258 | } InputFile; | 259 | } InputFile; |
| 259 | | 260 | |
| 260 | typedef struct OutputStream { | 261 | typedef struct OutputStream { |
| @@ -2587,12 +2588,6 @@ static int opt_frame_rate(const char *opt, const char *arg) · 2326 unmodified lines |
| 2587 | return 0; | 2588 | return 0; |
| 2588 | } | 2589 | } |
| 2589 | | 2590 | |
| 2590 | static int opt_frame_crop(const char *opt, const char *arg) | | |
| 2591 | { | | |
| 2592 | fprintf(stderr, "Option '%s' has been removed, use the crop filter instead\n", opt); | | |
| 2593 | return AVERROR(EINVAL); | | |
| 2594 | } | | |
| 2595 | | | |
| 2596 | static int opt_frame_size(const char *opt, const char *arg) | 2591 | static int opt_frame_size(const char *opt, const char *arg) |
| 2597 | { | 2592 | { |
| 2598 | if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) { | 2593 | if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) { |
| @@ -2602,11 +2597,6 @@ static int opt_frame_size(const char *opt, const char *arg) · 3 unmodified lines |
| 2602 | return 0; | 2597 | return 0; |
| 2603 | } | 2598 | } |
| 2604 | | 2599 | |
| 2605 | static int opt_pad(const char *opt, const char *arg) { | | |
| 2606 | fprintf(stderr, "Option '%s' has been removed, use the pad filter instead\n", opt); | | |
| 2607 | return -1; | | |
| 2608 | } | | |
| 2609 | | | |
| 2610 | static int opt_frame_pix_fmt(const char *opt, const char *arg) | 2600 | static int opt_frame_pix_fmt(const char *opt, const char *arg) |
| 2611 | { | 2601 | { |
| 2612 | if (strcmp(arg, "list")) { | 2602 | if (strcmp(arg, "list")) { |
| @@ -2785,13 +2775,13 @@ static int opt_map(const char *opt, const char *arg) · 172 unmodified lines |
| 2785 | } | 2775 | } |
| 2786 | if (*sync) | 2776 | if (*sync) |
| 2787 | sync++; | 2777 | sync++; |
| 2788 | for (i = 0; i < input_files[sync_file_idx].ctx->nb_streams; i++) | 2778 | for (i = 0; i < input_files[sync_file_idx].nb_streams; i++) |
| 2789 | if (check_stream_specifier(input_files[sync_file_idx].ctx, | 2779 | if (check_stream_specifier(input_files[sync_file_idx].ctx, |
| 2790 | input_files[sync_file_idx].ctx->streams[i], sync) == 1) { | 2780 | input_files[sync_file_idx].ctx->streams[i], sync) == 1) { |
| 2791 | sync_stream_idx = i; | 2781 | sync_stream_idx = i; |
| 2792 | break; | 2782 | break; |
| 2793 | } | 2783 | } |
| 2794 | if (i == input_files[sync_file_idx].ctx->nb_streams) { | 2784 | if (i == input_files[sync_file_idx].nb_streams) { |
| 2795 | av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not " | 2785 | av_log(NULL, AV_LOG_ERROR, "Sync stream specification in map %s does not " |
| 2796 | "match any streams.\n", arg); | 2786 | "match any streams.\n", arg); |
| 2797 | exit_program(1); | 2787 | exit_program(1); |
| @@ -2814,7 +2804,7 @@ static int opt_map(const char *opt, const char *arg) · 16 unmodified lines |
| 2814 | m->disabled = 1; | 2804 | m->disabled = 1; |
| 2815 | } | 2805 | } |
| 2816 | else | 2806 | else |
| 2817 | for (i = 0; i < input_files[file_idx].ctx->nb_streams; i++) { | 2807 | for (i = 0; i < input_files[file_idx].nb_streams; i++) { |
| 2818 | if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i], | 2808 | if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i], |
| 2819 | *p == ':' ? p + 1 : p) <= 0) | 2809 | *p == ':' ? p + 1 : p) <= 0) |
| 2820 | continue; | 2810 | continue; |
| @@ -4001,7 +3991,7 @@ static int opt_target(const char *opt, const char *arg) · 1180 unmodified lines |
| 4001 | if(nb_input_files) { | 3991 | if(nb_input_files) { |
| 4002 | int i, j; | 3992 | int i, j; |
| 4003 | for (j = 0; j < nb_input_files; j++) { | 3993 | for (j = 0; j < nb_input_files; j++) { |
| 4004 | for (i = 0; i < input_files[j].ctx->nb_streams; i++) { | 3994 | for (i = 0; i < input_files[j].nb_streams; i++) { |
| 4005 | AVCodecContext *c = input_files[j].ctx->streams[i]->codec; | 3995 | AVCodecContext *c = input_files[j].ctx->streams[i]->codec; |
| 4006 | if(c->codec_type != AVMEDIA_TYPE_VIDEO) | 3996 | if(c->codec_type != AVMEDIA_TYPE_VIDEO) |
| 4007 | continue; | 3997 | continue; |
| @@ -4222,15 +4212,6 @@ static const OptionDef options[] = { · 214 unmodified lines |
| 4222 | { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, | 4212 | { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, |
| 4223 | { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format, 'list' as argument shows all the pixel formats supported", "format" }, | 4213 | { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format, 'list' as argument shows all the pixel formats supported", "format" }, |
| 4224 | { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&frame_bits_per_raw_sample}, "set the number of bits per raw sample", "number" }, | 4214 | { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&frame_bits_per_raw_sample}, "set the number of bits per raw sample", "number" }, |
| 4225 | { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" }, | | |
| 4226 | { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" }, | | |
| 4227 | { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" }, | | |
| 4228 | { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop}, "Removed, use the crop filter instead", "size" }, | | |
| 4229 | { "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" }, | | |
| 4230 | { "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" }, | | |
| 4231 | { "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" }, | | |
| 4232 | { "padright", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "size" }, | | |
| 4233 | { "padcolor", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "Removed, use the pad filter instead", "color" }, | | |
| 4234 | { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" }, | 4215 | { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" }, |
| 4235 | { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" }, | 4216 | { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" }, |
| 4236 | { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" }, | 4217 | { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" }, |