mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-23 01:11:19 +03:00
Fplay: update
git-svn-id: svn://kolibrios.org@6438 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
f105b9cfdf
commit
e4cdc1239f
@ -133,6 +133,8 @@ struct vstate
|
||||
AVCodecContext *aCtx; /* audio decoder context */
|
||||
AVCodec *vCodec; /* video codec */
|
||||
AVCodec *aCodec; /* audio codec */
|
||||
enum AVCodecID codec_id;
|
||||
int codec_profile;
|
||||
char *input_file;
|
||||
char *input_name;
|
||||
int vStream; /* video stream index */
|
||||
|
@ -398,14 +398,32 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx,
|
||||
VAProfile profile = avctx->profile;
|
||||
enum AVCodecID codec = avctx->codec_id;
|
||||
|
||||
printf("%s codec %d profile %x\n", __FUNCTION__,avctx->codec_id, avctx->profile);
|
||||
|
||||
if (codec == AV_CODEC_ID_H264)
|
||||
{
|
||||
if(profile == FF_PROFILE_H264_BASELINE)
|
||||
profile = FF_PROFILE_H264_CONSTRAINED_BASELINE;
|
||||
};
|
||||
|
||||
if(avctx->hwaccel_context != NULL &&
|
||||
(vst->codec_id != codec ||
|
||||
vst->codec_profile != profile))
|
||||
{
|
||||
struct decoder* decoder = vst->decoder;
|
||||
|
||||
printf("\n%s codec changed!!!\n"
|
||||
"old id %d profile %x new id %d profile %x\n",
|
||||
__FUNCTION__, vst->codec_id, vst->codec_profile,
|
||||
codec, profile);
|
||||
|
||||
for(int i = 0; i < decoder->nframes; i++)
|
||||
{
|
||||
vframe_t *vframe = &decoder->vframes[i];
|
||||
vframe->format = AV_PIX_FMT_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
printf("\n%s codec %d profile %x\n", __FUNCTION__,avctx->codec_id, avctx->profile);
|
||||
|
||||
for (int i = 0; fmt[i] != PIX_FMT_NONE; i++)
|
||||
{
|
||||
if (fmt[i] != AV_PIX_FMT_VAAPI_VLD)
|
||||
@ -420,6 +438,8 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx,
|
||||
if (vaapi_init_decoder(vst, profile, VAEntrypointVLD, avctx->width, avctx->height) == 0)
|
||||
{
|
||||
avctx->hwaccel_context = v_context;
|
||||
vst->codec_id = codec;
|
||||
vst->codec_profile = profile;
|
||||
printf("%s format: %x\n",__FUNCTION__, fmt[i]);
|
||||
return fmt[i];
|
||||
}
|
||||
@ -458,9 +478,6 @@ static int get_buffer2(AVCodecContext *avctx, AVFrame *pic, int flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct vaapi_context va_context_storage;
|
||||
|
||||
|
||||
|
||||
#define EGL_TEXTURE_Y_U_V_WL 0x31D7
|
||||
#define EGL_TEXTURE_Y_UV_WL 0x31D8
|
||||
|
Loading…
Reference in New Issue
Block a user