Mercurial > libavformat.hg
comparison gif.c @ 743:af4e24d6310c libavformat
switch to native time bases
author | michael |
---|---|
date | Sat, 30 Apr 2005 21:43:59 +0000 |
parents | 8909a59c9461 |
children | 80aec794c2ed |
comparison
equal
deleted
inserted
replaced
742:21c1ae78f041 | 743:af4e24d6310c |
---|---|
314 av_free(gif); | 314 av_free(gif); |
315 return -1; | 315 return -1; |
316 } else { | 316 } else { |
317 width = video_enc->width; | 317 width = video_enc->width; |
318 height = video_enc->height; | 318 height = video_enc->height; |
319 // rate = video_enc->frame_rate; | 319 // rate = video_enc->time_base.den; |
320 } | 320 } |
321 | 321 |
322 /* XXX: is it allowed ? seems to work so far... */ | 322 /* XXX: is it allowed ? seems to work so far... */ |
323 video_enc->pix_fmt = PIX_FMT_RGB24; | 323 video_enc->pix_fmt = PIX_FMT_RGB24; |
324 | 324 |
347 delay = gif->file_time - gif->time; | 347 delay = gif->file_time - gif->time; |
348 | 348 |
349 /* XXX: should use delay, in order to be more accurate */ | 349 /* XXX: should use delay, in order to be more accurate */ |
350 /* instead of using the same rounded value each time */ | 350 /* instead of using the same rounded value each time */ |
351 /* XXX: don't even remember if I really use it for now */ | 351 /* XXX: don't even remember if I really use it for now */ |
352 jiffies = (70*enc->frame_rate_base/enc->frame_rate) - 1; | 352 jiffies = (70*enc->time_base.num/enc->time_base.den) - 1; |
353 | 353 |
354 put_le16(pb, jiffies); | 354 put_le16(pb, jiffies); |
355 | 355 |
356 put_byte(pb, 0x1f); /* transparent color index */ | 356 put_byte(pb, 0x1f); /* transparent color index */ |
357 put_byte(pb, 0x00); | 357 put_byte(pb, 0x00); |