Changeset 3887 for pjproject/trunk


Ignore:
Timestamp:
Nov 17, 2011 2:25:26 PM (13 years ago)
Author:
bennylp
Message:

Missing video component deinitialization caused assertion when the stack is restarted. Thanks Régis Montoya for the report (re #1393)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r3866 r3887  
    6565    } 
    6666 
    67     status = pjmedia_vid_dev_subsys_init(&pjsua_var.cp.factory); 
    68     if (status != PJ_SUCCESS) { 
    69         PJ_PERROR(1,(THIS_FILE, status, 
    70                      "Error creating PJMEDIA video subsystem")); 
    71         goto on_error; 
    72     } 
    73  
    7467#if PJMEDIA_HAS_VIDEO && PJMEDIA_HAS_FFMPEG_CODEC 
    7568    status = pjmedia_codec_ffmpeg_init(NULL, &pjsua_var.cp.factory); 
     
    8073    } 
    8174#endif 
     75 
     76    status = pjmedia_vid_dev_subsys_init(&pjsua_var.cp.factory); 
     77    if (status != PJ_SUCCESS) { 
     78        PJ_PERROR(1,(THIS_FILE, status, 
     79                     "Error creating PJMEDIA video subsystem")); 
     80        goto on_error; 
     81    } 
    8282 
    8383    for (i=0; i<PJSUA_MAX_VID_WINS; ++i) { 
     
    122122 
    123123#if PJMEDIA_HAS_FFMPEG_CODEC 
    124             pjmedia_codec_ffmpeg_deinit(); 
     124    pjmedia_codec_ffmpeg_deinit(); 
    125125#endif 
     126 
     127    if (pjmedia_vid_codec_mgr_instance()) 
     128        pjmedia_vid_codec_mgr_destroy(NULL); 
     129 
     130    if (pjmedia_converter_mgr_instance()) 
     131        pjmedia_converter_mgr_destroy(NULL); 
     132 
     133    if (pjmedia_video_format_mgr_instance()) 
     134        pjmedia_video_format_mgr_destroy(NULL); 
    126135 
    127136    pj_log_pop_indent(); 
Note: See TracChangeset for help on using the changeset viewer.