1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

committed Roberto Togni's patch for control() function in HuffYUV decoder

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5262 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
melanson 2002-03-22 14:11:13 +00:00
parent 404aa1bdcf
commit 817080c800

View File

@ -161,8 +161,23 @@ unsigned char huff_decompress(unsigned int* in, unsigned int *pos,
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
return CONTROL_UNKNOWN;
static int control(sh_video_t *sh,int cmd,void* arg,...)
{
switch(cmd) {
case VDCTRL_QUERY_FORMAT:
if (((huffyuv_context_t *)(sh->context))->bitmaptype == BMPTYPE_YUV) {
if (*((int*)arg) == IMGFMT_YUY2)
return CONTROL_TRUE;
else
return CONTROL_FALSE;
} else {
if ((*((int*)arg) == IMGFMT_BGR32) || (*((int*)arg) == IMGFMT_BGR24))
return CONTROL_TRUE;
else
return CONTROL_FALSE;
}
}
return CONTROL_UNKNOWN;
}