Changeset 4084


Ignore:
Timestamp:
Apr 25, 2012 7:13:05 AM (7 years ago)
Author:
ming
Message:

Re #1446 (misc): Fix possible crash if video ports are destroyed in the wrong order (i.e. client port must be destroyed last).

Location:
pjproject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/test/vid_codec_test.c

    r4049 r4084  
    418418        PJ_PERROR(3, (THIS_FILE, status, "  error")); 
    419419    } 
    420     if (capture) { 
     420    if (capture) 
    421421        pjmedia_vid_port_stop(capture); 
     422    if (renderer) 
     423        pjmedia_vid_port_stop(renderer); 
     424    if (capture) 
    422425        pjmedia_vid_port_destroy(capture); 
    423     } 
    424     if (renderer) { 
    425         pjmedia_vid_port_stop(renderer); 
     426    if (renderer) 
    426427        pjmedia_vid_port_destroy(renderer); 
    427     } 
    428428    if (codec) { 
    429429        pjmedia_event_unsubscribe(NULL, &codec_on_event, &codec_port_data, 
  • pjproject/trunk/pjmedia/src/test/vid_dev_test.c

    r4049 r4084  
    192192 
    193193    if (capture) 
     194        pjmedia_vid_port_stop(capture); 
     195    if (renderer) 
     196        pjmedia_vid_port_stop(renderer); 
     197    if (capture) 
    194198        pjmedia_vid_port_destroy(capture); 
    195199    if (renderer) { 
  • pjproject/trunk/pjmedia/src/test/vid_port_test.c

    r4049 r4084  
    149149 
    150150    if (capture) 
     151        pjmedia_vid_port_stop(capture); 
     152    if (renderer) 
     153        pjmedia_vid_port_stop(renderer); 
     154    if (capture) 
    151155        pjmedia_vid_port_destroy(capture); 
    152156    if (renderer) { 
  • pjproject/trunk/pjsip-apps/src/samples/vid_streamutil.c

    r4055 r4084  
    892892on_exit: 
    893893 
     894    /* Stop video devices */ 
     895    if (capture) 
     896        pjmedia_vid_port_stop(capture); 
     897    if (renderer) 
     898        pjmedia_vid_port_stop(renderer); 
     899 
    894900    /* Stop and destroy file clock */ 
    895901    if (play_clock) { 
Note: See TracChangeset for help on using the changeset viewer.