Commit 335a1e8c authored by michael's avatar michael

always honor the user specified frame rate if set


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4186 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 151ead2b
...@@ -235,14 +235,14 @@ static int video_read_header(AVFormatContext *s, ...@@ -235,14 +235,14 @@ static int video_read_header(AVFormatContext *s,
/* for mjpeg, specify frame rate */ /* for mjpeg, specify frame rate */
/* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/
if (st->codec.codec_id == CODEC_ID_MJPEG || if (ap && ap->time_base.num) {
st->codec.codec_id == CODEC_ID_MPEG4) { av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
if (ap && ap->time_base.num) { } else if ( st->codec.codec_id == CODEC_ID_MJPEG ||
av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); st->codec.codec_id == CODEC_ID_MPEG4 ||
} else { st->codec.codec_id == CODEC_ID_H264) {
av_set_pts_info(st, 64, 1, 25); av_set_pts_info(st, 64, 1, 25);
}
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment