RGB565_video
RGB565_video copied to clipboard
Can't play a 2nd video
Great library and examples! I'v adopted the main routine of SD_MJPEG_video to play two videos, one after the other. The 1st video plays fine, the 2nd not at all. The videos are mjpeg's at 320x240/25fps without audio. What I'm missing here?
uint8_t *mjpeg_buf = (uint8_t *)malloc(MJPEG_BUFFER_SIZE);
File vFile = SD.open(file1);
mjpeg.setup(vFile, mjpeg_buf, gfx, true);
while (mjpeg.readMjpegBuf()) {
mjpeg.drawJpg();
}
vFile.close();
free(mjpeg_buf);
uint8_t *mjpeg_buf = (uint8_t *)malloc(MJPEG_BUFFER_SIZE);
File vFile = SD.open(file2);
mjpeg.setup(vFile, mjpeg_buf, gfx, true);
while (mjpeg.readMjpegBuf()) {
mjpeg.drawJpg();
}
vFile.close();
free(mjpeg_buf);
I think you don't need free and re-malloc the buffer.
And also get update to avoid re-malloc in mjpeg class
Thanks for the update, but still can't play a 2nd video. I'l send you the access to the modified code of your example as a playground/test.
In case you haven't received the invitation to the mentioned repo, here is the link: https://github.com/ojaksch/SD_MJPEG_video3 Simple and stupid code, just to play two videos in a row.
Thanks for your invitation, but I am still fighting in my code.
「Larry @.***>」在 2021年5月2日週日,19:40 寫道:
In case you haven't received the invitation to the mentioned repo, here is the link: https://github.com/ojaksch/SD_MJPEG_video3 Simple and stupid code, just to play two videos in a row.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/moononournation/RGB565_video/issues/8#issuecomment-830795931, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADE5WW7Z5AO6JF7GCKKATOTTLU23XANCNFSM43TCDMDA .
我也遇到同样问题,无法播放同一个目录的第2个视频,感觉像是什么资源没释放,导致无法读视频文件
Just reworked my sketch and included the MJPEG routine of your GFX_Library_for_Arduino. Now playning some videos one after the other is is working fine. So for me the problen is "solved" and I'd like to close this issue, if nobody else is complaining...