FS-10094: [core,mod_av] Alpha video support #resolve
This commit is contained in:
parent
90eb89dbd0
commit
a7c4b22ac9
|
@ -1468,6 +1468,17 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
|
||||||
|
|
||||||
if (!context->has_video) {
|
if (!context->has_video) {
|
||||||
switch_clear_flag(handle, SWITCH_FILE_FLAG_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;
|
return status;
|
||||||
|
|
Loading…
Reference in New Issue