if (codec && codec->pix_fmts) {
const enum AVPixelFormat *p = codec->pix_fmts;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
+ //FIXME: This should check for AV_PIX_FMT_FLAG_ALPHA after PAL8 pixel format without alpha is implemented
int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
enum AVPixelFormat best= AV_PIX_FMT_NONE;
exit_program(1);
}
ist = input_streams[input_files[file_idx]->ist_index + st->index];
+ if (ist->user_set_discard == AVDISCARD_ALL) {
+ av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
+ "matches a disabled input stream.\n", p, fg->graph_desc);
+ exit_program(1);
+ }
} else {
/* find the first unused stream of corresponding type */
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];
+ if (ist->user_set_discard == AVDISCARD_ALL)
+ continue;
if (ist->dec_ctx->codec_type == type && ist->discard)
break;
}
sar = ifilter->sample_aspect_ratio;
if(!sar.den)
sar = (AVRational){0,1};
- av_bprint_init(&args, 0, 1);
+ av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
av_bprintf(&args,
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
"pixel_aspect=%d/%d:sws_param=flags=%d",