Do not force fps unless the user actually specified one.

fixes issue309

Originally committed as revision 11322 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2007-12-26 22:28:22 +00:00
parent b4abe1d198
commit 9de0be61be
2 changed files with 9 additions and 6 deletions

View File

@@ -85,7 +85,10 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_set_pts_info(st, 64, 1, st->codec->sample_rate);
break;
case CODEC_TYPE_VIDEO:
av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
if(ap->time_base.num)
av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
else
av_set_pts_info(st, 64, 1, 25);
st->codec->width = ap->width;
st->codec->height = ap->height;
st->codec->pix_fmt = ap->pix_fmt;