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;
}
if (!ist->sub2video.frame)
return AVERROR(ENOMEM);
ist->sub2video.last_pts = INT64_MIN;
+ ist->sub2video.end_pts = INT64_MIN;
return 0;
}
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",
+ "pixel_aspect=%d/%d",
ifilter->width, ifilter->height, ifilter->format,
- tb.num, tb.den, sar.num, sar.den,
- SWS_BILINEAR + ((ist->dec_ctx->flags&AV_CODEC_FLAG_BITEXACT) ? SWS_BITEXACT:0));
+ tb.num, tb.den, sar.num, sar.den);
if (fr.num && fr.den)
av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den);
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,