avoid encoder crash with random pixel input
Merge pull request #1286 from ethanhugg/FF33-patch

avoid encoder crash with random pixel input