+ if(o->type == FF_OPT_TYPE_BINARY){
+ uint8_t **dst = (uint8_t **)(((uint8_t*)obj) + o->offset);
+ int *lendst = (int *)(dst + 1);
+ uint8_t *bin, *ptr;
+ int len = strlen(val);
+ av_freep(dst);
+ *lendst = 0;
+ if (len & 1) return NULL;
+ len /= 2;
+ ptr = bin = av_malloc(len);
+ while (*val) {
+ int a = hexchar2int(*val++);
+ int b = hexchar2int(*val++);
+ if (a < 0 || b < 0) {
+ av_free(bin);
+ return NULL;
+ }
+ *ptr++ = (a << 4) | b;
+ }
+ *dst = bin;
+ *lendst = len;
+ return o;
+ }