mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-26 17:30:32 -04:00
c54cc0bf5b30b9d8ecf3d09ab9f8206e1f9d85ab
After you call av_frame_alloc(), ffmpeg expects you to fill in certain fields on the frame, depending on whether it's an audio or video frame. obs-ffmpeg did this in the two places where it allocates video frames, but not where it allocates audio frames. On my system, using trunk ffmpeg and the Opus codec, this causes OBS to crash while calling avcodec_send_frame, ultimately because av_frame_copy fails due to 'dst->format < 0' (as 'format' stays at the default of -1), causing a null pointer to be added to a buffer queue, which later gets dereferenced. Oddly, the fields in question can just be copied directly from corresponding fields in the AVCodecContext, but I don't see any ffmpeg API to automatically copy all relevant fields, and all the examples I've seen do it by hand. So this patch does the same.
…
…
OBS Studio <https://obsproject.com> =================================== What is OBS Studio? ------------------- OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently. It's distributed under the GNU General Public License v2 - see the accompanying COPYING file for more details. Quick Links ----------- - Website: https://obsproject.com - Help/Documentation/Guides: https://github.com/obsproject/obs-studio/wiki - Forums: https://obsproject.com/forum/ - Build Instructions: https://github.com/obsproject/obs-studio/wiki/Install-Instructions - Developer/API Documentation: https://obsproject.com/docs - Bug Tracker: https://obsproject.com/mantis/ (Note: The bug tracker is linked to forum accounts. To use the bug tracker, log in to a forum account) Contributing ------------ - If you wish to contribute code to the project, please make sure to read the coding and commit guidelines: https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst - Developer/API documentation can be found here: https://obsproject.com/docs - If you wish to contribute translations, do not submit pull requests. Instead, please use Crowdin. For more information read this thread: https://obsproject.com/forum/threads/how-to-contribute-translations-for-obs.16327/ - Other ways to contribute are by helping people out with support on our forums or in our community chat. Please limit support to topics you fully understand -- bad advice is worse than no advice. When it comes to something that you don't fully know or understand, please defer to the official help or official channels.
Description
OBS Studio - Free and open source software for live streaming and screen recording
cc-plus-plusdirectshowfacebook-liveffmpeggame-capturelive-streamingscreen-capturetwitch-tvvideo-recordingyoutube-live
Readme
350 MiB
Languages
C
52.6%
C++
36%
CMake
3.4%
Swift
2.9%
Objective-C
2.7%
Other
2.2%