FS-10094: [core,mod_av] Alpha video support #resolve

This commit is contained in:
Anthony Minessale 2017-03-16 10:00:33 -05:00
parent 90eb89dbd0
commit a7c4b22ac9
1 changed files with 13 additions and 2 deletions

View File

@ -1468,6 +1468,17 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
if (!context->has_video) {
switch_clear_flag(handle, SWITCH_FILE_FLAG_VIDEO);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "video pix_fmt: %d\n", context->video_st.st->codec->pix_fmt);
switch (context->video_st.st->codec->pix_fmt) {
case AV_PIX_FMT_YUVA420P:
case AV_PIX_FMT_RGBA:
case AV_PIX_FMT_ARGB:
case AV_PIX_FMT_BGRA:
context->handle->mm.fmt = SWITCH_IMG_FMT_ARGB;
default:
context->handle->mm.fmt = SWITCH_IMG_FMT_I420;
}
}
return status;