Fix camera encoding problem on some device