test/encode/avcenc: Wait upload thread exiting before release driver resource.
test/encode/avcenc: Wait upload thread exiting before release driver resource.

Signed-off-by: Zhou Chang <51ad061729f5418fbf57d7f4d13e3e85573c85d5@intel.com>

pma1/libva,pma1/libva,gbeauchesne/libva,gbeauchesne/libva,chenxianqin/vaapi-libva,01org/iotg-lin-gfx-libva,chenxianqin/vaapi-libva,pma1/libva,gbeauchesne/libva,zzhhui/libva,01org/libva-cros,chenxianqin/vaapi-libva,zzhhui/libva,01org/iotg-lin-gfx-libva,01org/iotg-lin-gfx-libva,01org/libva-cros,01org/libva-cros,zzhhui/libva