|
@@ -546,6 +546,8 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
|
|
|
return AVERROR(errno);
|
|
|
}
|
|
|
}
|
|
|
+ s1->streams[0]->codec->time_base.den = tpf->denominator;
|
|
|
+ s1->streams[0]->codec->time_base.num = tpf->numerator;
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -679,8 +681,6 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|
|
st->codec->codec_id = codec_id;
|
|
|
st->codec->width = s->width;
|
|
|
st->codec->height = s->height;
|
|
|
- st->codec->time_base.den = ap->time_base.den;
|
|
|
- st->codec->time_base.num = ap->time_base.num;
|
|
|
st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;
|
|
|
|
|
|
out:
|