Skip to content

Commit

Permalink
fix issue for screen sharing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Jul 22, 2022
1 parent 703ae40 commit e958e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/objc/native/src/objc_video_track_source.mm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ - (void)capturer:(RTC_OBJC_TYPE(RTCVideoCapturer) *)capturer
ObjCVideoTrackSource::ObjCVideoTrackSource() : ObjCVideoTrackSource(false) {}

ObjCVideoTrackSource::ObjCVideoTrackSource(bool is_screencast)
: AdaptedVideoTrackSource(/* required resolution alignment */ 2),
: AdaptedVideoTrackSource(/* required resolution alignment */ is_screencast? 16 : 2),
is_screencast_(is_screencast) {}

ObjCVideoTrackSource::ObjCVideoTrackSource(RTCObjCVideoSourceAdapter *adapter) : adapter_(adapter) {
Expand Down

1 comment on commit e958e66

@vickyleu
Copy link

@vickyleu vickyleu commented on e958e66 Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is always crash when macOS sharing the screen, "Trying to access encoder in uninitialized fallback wrapper."
video_encoder_software_fallback_wrapper.cc #current_encoder


->  0x10a1c14a7 <+2743>: movl   %eax, %ebx
    0x10a1c14a9 <+2745>: cmpl   $-0xd, %eax
    0x10a1c14ac <+2748>: jne    0x10a1c1872               ; <+3714>
    0x10a1c14b2 <+2754>: movq   %r12, %rdi
    0x10a1c14b5 <+2757>: xorl   %esi, %esi
    0x10a1c14b7 <+2759>: callq  0x10a1c1e20               ; <+5168>
    0x10a1c14bc <+2764>: movl   $0xfffffff3, %ebx         ; imm = 0xFFFFFFF3 
    0x10a1c14c1 <+2769>: testb  %al, %al
    0x10a1c14c3 <+2771>: je     0x10a1c1872               ; <+3714>
    0x10a1c14c9 <+2777>: movl   0x328(%r12), %eax
    0x10a1c14d1 <+2785>: leal   -0x2(%rax), %ecx
    0x10a1c14d4 <+2788>: cmpl   $0x2, %ecx
    0x10a1c14d7 <+2791>: jb     0x10a1c1556               ; <+2918>
    0x10a1c14d9 <+2793>: leaq   0x330(%r12), %rbx
    0x10a1c14e1 <+2801>: cmpl   $0x1, %eax
    0x10a1c14e4 <+2804>: je     0x10a1c155e               ; <+2926>
    0x10a1c14e6 <+2806>: testl  %eax, %eax
    0x10a1c14e8 <+2808>: jne    0x10a1c189b               ; <+3755>
    0x10a1c14ee <+2814>: callq  0x109c946b0               ; ___lldb_unnamed_symbol791$$WebRTC
    0x10a1c14f3 <+2819>: testb  %al, %al
    0x10a1c14f5 <+2821>: jne    0x10a1c155e               ; <+2926>
    0x10a1c14f7 <+2823>: leaq   0x53a1df(%rip), %rdi      ; typeinfo name for rtc::IPAddress + 17
    0x10a1c14fe <+2830>: leaq   0x6801fb(%rip), %rsi      ; "../../api/video_codecs/video_encoder_software_fallback_wrapper.cc"
    0x10a1c1505 <+2837>: leaq   0x6803b4(%rip), %rcx      ; "Trying to access encoder in uninitialized fallback wrapper."
    0x10a1c150c <+2844>: movl   $0x4da, %edx              ; imm = 0x4DA 
#0	0x0000000109e961c3 in ___lldb_unnamed_symbol4510$$WebRTC ()
#1	0x0000000109e8abbe in ___lldb_unnamed_symbol4391$$WebRTC ()
#2	0x0000000109e88ad4 in ___lldb_unnamed_symbol4365$$WebRTC ()
#3	0x0000000109d81201 in ___lldb_unnamed_symbol2173$$WebRTC ()
#4	0x0000000109d59c82 in ___lldb_unnamed_symbol1966$$WebRTC ()
#5	0x000000010a1c14a7 in webrtc::CreateVideoEncoderSoftwareFallbackWrapper(std::__1::unique_ptr<webrtc::VideoEncoder, std::__1::default_delete<webrtc::VideoEncoder> >, std::__1::unique_ptr<webrtc::VideoEncoder, std::__1::default_delete<webrtc::VideoEncoder> >, bool) ()
#6	0x000000010a1be0b0 in webrtc::SimulcastEncoderAdapter::Encode(webrtc::VideoFrame const&, std::__1::vector<webrtc::VideoFrameType, std::__1::allocator<webrtc::VideoFrameType> > const*) ()
#7	0x000000010a3058ca in ___lldb_unnamed_symbol12002$$WebRTC ()
#8	0x000000010a304b2d in ___lldb_unnamed_symbol12000$$WebRTC ()
#9	0x000000010a308a44 in ___lldb_unnamed_symbol12023$$WebRTC ()
#10	0x000000010a59f473 in ___lldb_unnamed_symbol15895$$WebRTC ()

Please sign in to comment.