Changeset 3530


Ignore:
Timestamp:
Apr 13, 2011 6:06:21 PM (14 years ago)
Author:
bennylp
Message:

Re #1219: attempt to fix crash in H.264 decoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c

    r3526 r3530  
    943943    char errbuf[512]; 
    944944    if (av_strerror(err, errbuf, sizeof(errbuf)) >= 0) 
    945         PJ_LOG(1, (THIS_FILE, "ffmpeg err %d: %s", err, errbuf)); 
     945        PJ_LOG(5, (THIS_FILE, "ffmpeg err %d: %s", err, errbuf)); 
    946946#else 
    947     PJ_LOG(1, (THIS_FILE, "ffmpeg err %d", err)); 
     947    PJ_LOG(5, (THIS_FILE, "ffmpeg err %d", err)); 
    948948#endif 
    949949 
     
    13741374         */ 
    13751375        if (ff->dec_ctx->pix_fmt != ff->expected_dec_fmt || 
    1376             ff->dec_ctx->coded_width != (int)vafp->size.w || 
    1377             ff->dec_ctx->coded_height != (int)vafp->size.h) 
     1376            ff->dec_ctx->width != (int)vafp->size.w || 
     1377            ff->dec_ctx->height != (int)vafp->size.h) 
    13781378        { 
    13791379            pjmedia_format_id new_fmt_id; 
     
    13881388            /* Update decoder format in param */ 
    13891389            ff->param.dec_fmt.id = new_fmt_id; 
    1390             ff->param.dec_fmt.det.vid.size.w = ff->dec_ctx->coded_width; 
    1391             ff->param.dec_fmt.det.vid.size.h = ff->dec_ctx->coded_height; 
     1390            ff->param.dec_fmt.det.vid.size.w = ff->dec_ctx->width; 
     1391            ff->param.dec_fmt.det.vid.size.h = ff->dec_ctx->height; 
    13921392 
    13931393            /* Re-init format info and apply-param of decoder */ 
     
    14041404            /* Notify application via the bit_info field of pjmedia_frame */ 
    14051405            output->bit_info = PJMEDIA_VID_CODEC_EVENT_FMT_CHANGED; 
    1406  
    1407             /* Check provided buffer size after format changed */ 
    1408             if (vafp->framebytes > output_buf_len) 
    1409                 return PJ_ETOOSMALL; 
    14101406        } 
     1407 
     1408        /* Check provided buffer size after format changed */ 
     1409        if (vafp->framebytes > output_buf_len) 
     1410            return PJ_ETOOSMALL; 
    14111411 
    14121412        /* Get the decoded data */ 
Note: See TracChangeset for help on using the changeset viewer.