aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
commitc0df9d75bd9a3170a793eb1651354076360998e8 (patch)
tree0f4c75f07fc395d168bf0a7fcd92d6f9d9e9281b /libavformat/img2.c
parentb7782b47c95c26d674df134973d1403e80fe9767 (diff)
downloadffmpeg-c0df9d75bd9a3170a793eb1651354076360998e8.tar.gz
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 0d58604beb..fe225e970a 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -186,12 +186,10 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->need_parsing= 1;
}
- if (!ap || !ap->frame_rate) {
- st->codec.frame_rate = 25;
- st->codec.frame_rate_base = 1;
+ if (!ap || !ap->time_base.num) {
+ av_set_pts_info(st, 60, 1, 25);
} else {
- st->codec.frame_rate = ap->frame_rate;
- st->codec.frame_rate_base = ap->frame_rate_base;
+ av_set_pts_info(st, 60, ap->time_base.num, ap->time_base.den);
}
if(ap && ap->width && ap->height){
@@ -207,9 +205,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->img_number = first_index;
/* compute duration */
st->start_time = 0;
- st->duration = ((int64_t)AV_TIME_BASE *
- (last_index - first_index + 1) *
- st->codec.frame_rate_base) / st->codec.frame_rate;
+ st->duration = last_index - first_index + 1;
}
if(ap->video_codec_id){