mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-20 05:01:51 -04:00
Merge pull request #2010 from wanhongqing123/master
win-dshow: fix H264 to mjpeg issue
This commit is contained in:
1 file changed
+6
@@ -468,6 +468,12 @@ static inline enum speaker_layout convert_speaker_layout(uint8_t channels)
|
||||
void DShowInput::OnEncodedVideoData(enum AVCodecID id, unsigned char *data,
|
||||
size_t size, long long ts)
|
||||
{
|
||||
/* If format changes, free and allow it to recreate the decoder */
|
||||
if (ffmpeg_decode_valid(video_decoder) &&
|
||||
video_decoder->codec->id != id) {
|
||||
ffmpeg_decode_free(video_decoder);
|
||||
}
|
||||
|
||||
if (!ffmpeg_decode_valid(video_decoder)) {
|
||||
/* Only use MJPEG hardware decoding on resolutions higher
|
||||
* than 1920x1080. The reason why is because we want to strike
|
||||
|
||||
Reference in new issue
Block a user