|
|
@ -632,17 +632,17 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, |
|
|
|
*pden = 0; |
|
|
|
*pden = 0; |
|
|
|
switch(st->codec.codec_type) { |
|
|
|
switch(st->codec.codec_type) { |
|
|
|
case CODEC_TYPE_VIDEO: |
|
|
|
case CODEC_TYPE_VIDEO: |
|
|
|
if(st->codec.time_base.num*1000 <= st->codec.time_base.den){ |
|
|
|
if(st->time_base.num*1000 > st->time_base.den){ |
|
|
|
*pnum = st->time_base.num; |
|
|
|
*pnum = st->time_base.num; |
|
|
|
*pden = st->time_base.den; |
|
|
|
*pden = st->time_base.den; |
|
|
|
}else{ |
|
|
|
}else if(st->codec.time_base.num*1000 > st->codec.time_base.den){ |
|
|
|
*pnum = st->codec.time_base.num; |
|
|
|
*pnum = st->codec.time_base.num; |
|
|
|
*pden = st->codec.time_base.den; |
|
|
|
*pden = st->codec.time_base.den; |
|
|
|
} |
|
|
|
|
|
|
|
if (pc && pc->repeat_pict) { |
|
|
|
if (pc && pc->repeat_pict) { |
|
|
|
*pden *= 2; |
|
|
|
*pden *= 2; |
|
|
|
*pnum = (*pnum) * (2 + pc->repeat_pict); |
|
|
|
*pnum = (*pnum) * (2 + pc->repeat_pict); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CODEC_TYPE_AUDIO: |
|
|
|
case CODEC_TYPE_AUDIO: |
|
|
|
frame_size = get_audio_frame_size(&st->codec, pkt->size); |
|
|
|
frame_size = get_audio_frame_size(&st->codec, pkt->size); |
|
|
|