mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 09:56:30 +00:00
moved get_image into decoder (Arpi's request)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5277 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1dccf216e6
commit
8d4022576e
@ -73,10 +73,6 @@ static int init(sh_video_t *sh)
|
||||
if (!mpcodecs_config_vo(sh, ctx->width, ctx->height, IMGFMT_BGR|ctx->depth))
|
||||
return(NULL);
|
||||
|
||||
ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
|
||||
ctx->width, ctx->height);
|
||||
if (!ctx->mpi)
|
||||
return(NULL);
|
||||
|
||||
return(1);
|
||||
}
|
||||
@ -104,6 +100,11 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
|
||||
if (len <= 0)
|
||||
return(NULL); // skipped frame
|
||||
|
||||
ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
|
||||
ctx->width, ctx->height);
|
||||
if (!ctx->mpi)
|
||||
return(NULL);
|
||||
|
||||
zstrm->next_in = data;
|
||||
zstrm->avail_in = len;
|
||||
zstrm->next_out = ctx->mpi->planes[0];
|
||||
|
Loading…
Reference in New Issue
Block a user