Mercurial > libavformat.hg
comparison raw.c @ 85:25062c9b1f86 libavformat
per context frame_rate_base, this should finally fix frame_rate related av sync issues
author | michaelni |
---|---|
date | Wed, 12 Mar 2003 15:16:19 +0000 |
parents | a58a8a53eb46 |
children | fa3ebf0d0270 |
comparison
equal
deleted
inserted
replaced
84:0068a6902911 | 85:25062c9b1f86 |
---|---|
59 case CODEC_TYPE_AUDIO: | 59 case CODEC_TYPE_AUDIO: |
60 st->codec.sample_rate = ap->sample_rate; | 60 st->codec.sample_rate = ap->sample_rate; |
61 st->codec.channels = ap->channels; | 61 st->codec.channels = ap->channels; |
62 break; | 62 break; |
63 case CODEC_TYPE_VIDEO: | 63 case CODEC_TYPE_VIDEO: |
64 st->codec.frame_rate = ap->frame_rate; | 64 st->codec.frame_rate = ap->frame_rate; |
65 st->codec.frame_rate_base = ap->frame_rate_base; | |
65 st->codec.width = ap->width; | 66 st->codec.width = ap->width; |
66 st->codec.height = ap->height; | 67 st->codec.height = ap->height; |
67 break; | 68 break; |
68 default: | 69 default: |
69 return -1; | 70 return -1; |
149 st->codec.codec_id = s->iformat->value; | 150 st->codec.codec_id = s->iformat->value; |
150 /* for mjpeg, specify frame rate */ | 151 /* for mjpeg, specify frame rate */ |
151 /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ | 152 /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ |
152 if (st->codec.codec_id == CODEC_ID_MJPEG || st->codec.codec_id == CODEC_ID_MPEG4) { | 153 if (st->codec.codec_id == CODEC_ID_MJPEG || st->codec.codec_id == CODEC_ID_MPEG4) { |
153 if (ap) { | 154 if (ap) { |
154 st->codec.frame_rate = ap->frame_rate; | 155 st->codec.frame_rate = ap->frame_rate; |
156 st->codec.frame_rate_base = ap->frame_rate_base; | |
155 } else { | 157 } else { |
156 st->codec.frame_rate = 25 * FRAME_RATE_BASE; | 158 st->codec.frame_rate = 25; |
159 st->codec.frame_rate_base = 1; | |
157 } | 160 } |
158 } | 161 } |
159 return 0; | 162 return 0; |
160 } | 163 } |
161 | 164 |