Changeset 4952 for pjproject


Ignore:
Timestamp:
Oct 17, 2014 6:47:02 AM (10 years ago)
Author:
ming
Message:

Fixed #1799: Fix finding highest resolution for H264

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c

    r4854 r4952  
    4040 
    4141/* Default frame rate, if not specified */ 
    42 #define DEFAULT_H264_FPS_NUM        15 
     42#define DEFAULT_H264_FPS_NUM        10 
    4343#define DEFAULT_H264_FPS_DENUM      1 
    4444 
    4545/* Default aspect ratio, if not specified */ 
    46 #define DEFAULT_H264_RATIO_NUM      16 
    47 #define DEFAULT_H264_RATIO_DENUM    9 
     46#define DEFAULT_H264_RATIO_NUM      4 
     47#define DEFAULT_H264_RATIO_DENUM    3 
    4848 
    4949 
     
    637637 
    638638    /* Check if the specified ratio is using big numbers 
    639      * (not normalizable), override it with default ratio! 
     639     * (not normalizable), override it! 
    640640     */ 
    641     if ((int)max_fs < asp_ratio.num * asp_ratio.denum) 
    642         asp_ratio = def_ratio; 
     641    if ((int)max_fs < asp_ratio.num * asp_ratio.denum) { 
     642        if ((int)max_fs >= def_ratio.num * def_ratio.denum) 
     643            asp_ratio = def_ratio; 
     644        else 
     645            asp_ratio.num = asp_ratio.denum = 1; 
     646    } 
    643647 
    644648    /* Calculate the scale factor for size */ 
Note: See TracChangeset for help on using the changeset viewer.