Changeset 1382:d90a390c781b in mediastreamer2


Ignore:
Timestamp:
May 6, 2011 1:40:08 PM (2 years ago)
Author:
Guillaume Beraudo <guillaume.beraudo@…>
Branch:
default
Message:

Fix bad locking style. Fix crash on resize on Mac?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/videoout.c

    r1381 r1382  
    654654} 
    655655 
    656 static void poll_for_resizing_lock_filter_and_enventually_prepare(MSFilter *f) { 
    657         VideoOut *obj=(VideoOut*)f->data; 
     656static void poll_for_resizing(MSFilter *f) { 
    658657        int i; 
    659  
    660658        for(i=0;i<100;++i){ 
    661659                int ret = _video_out_handle_resizing(f, NULL); 
    662                 if (ret<0) 
    663                         break; 
    664         } 
    665         ms_filter_lock(f); 
    666         if (!obj->ready) video_out_prepare(f); 
     660                if (ret<0) break; 
     661        } 
    667662} 
    668663 
     
    672667        MSFilter *f = (MSFilter *) info; 
    673668        VideoOut *obj=(VideoOut*)f->data; 
    674         poll_for_resizing_lock_filter_and_enventually_prepare(f); 
     669        poll_for_resizing(f); 
     670        ms_filter_lock(f); 
     671        if (!obj->ready) video_out_prepare(f); 
    675672 
    676673        if (obj->need_update) { 
     
    724721        int update_selfview=0; 
    725722 
    726 #ifndef __APPLE__ 
    727         poll_for_resizing_lock_filter_and_enventually_prepare(f); 
     723#ifdef __APPLE__ 
     724        ms_filter_lock(f); 
     725#else 
     726        poll_for_resizing(f); 
     727        ms_filter_lock(f); 
     728        if (!obj->ready) video_out_prepare(f); 
    728729#endif 
    729730        if (!obj->ready){ 
Note: See TracChangeset for help on using the changeset viewer.