saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
3.02k stars 1.21k forks source link

uvc_mjpeg2rgbx() causes crashes #649

Open zipswich opened 2 years ago

zipswich commented 2 years ago

In UVCPreview.cpp, I have modified void UVCPreview::do_preview(uvc_stream_ctrl_t *ctrl) to replace

result = uvc_mjpeg2yuyv(frame_mjpeg, frame); 

with

result = uvc_mjpeg2rgbx(frame_mjpeg, frame)

It frequently crashes:

********** Crash dump: **********
Build fingerprint: 'Android/sdm660_64/sdm660_64:9/PKQ1.190319.001/sw09090959:user/release-keys'
#00 0x0000000000044244 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0xae000)
#01 0x000000000002b1c8 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0xae000)
#02 0x0000000000023810 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0xae000)
#03 0x000000000001afcc /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0xae000) (jpeg_read_scanlines+152)
#04 0x0000000000011390 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0x15b000) (uvc_mjpeg2rgbx+736)
#05 0x00000000000139d0 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0x131000) (UVCPreview::do_preview(uvc_stream_ctrl*)+300)
#06 0x0000000000013214 /data/app/com.serenegiant.usbcameratest8-oQ025OFMi5Mkmox_5Dt1qw==/base.apk (offset 0x131000) (UVCPreview::preview_thread_func(void*)+48)
#07 0x0000000000092090 /system/lib64/libc.so (__pthread_start(void*)+36)
#08 0x000000000002393c /system/lib64/libc.so (__start_thread+68)

Could anyone shed some light on this?

06110902002 commented 1 year ago

i meet the some problem