On Thu, Nov 30, 2017 at 10:12:53AM +0100, Felix Matouschek wrote:
> Am 29.11.2017 04:31, schrieb Michael Niedermayer:
> 
> >if the identifer and the string always match you could do this
> >with a macro avoiding the neede to duplcate each string
> >see AV_STRINGIFY
> 
> I changed it, is it ok like this?
> 
> >[...]
> >>+static int add_video_stream(AVFormatContext *avctx)
> >>+{
> >>+    AndroidCameraCtx *ctx = avctx->priv_data;
> >>+    AVStream *st;
> >>+    AVCodecParameters *codecpar;
> >>+
> >>+    st = avformat_new_stream(avctx, NULL);
> >>+    if (!st) {
> >>+        return AVERROR(ENOMEM);
> >>+    }
> >>+
> >>+    st->id = VIDEO_STREAM_INDEX;
> >
> >>+    st->avg_frame_rate = (AVRational) { ctx->framerate_range[1], 1 };
> >>+    st->r_frame_rate = (AVRational) { ctx->framerate_range[1], 1 };
> >
> >Are these values always correct ?
> 
> You mean avg_frame_rate and r_frame_rate?
> The framerate can vary between the values in framerate_range[0]
> (min) and framerate_range[1] (max).
> Ideally both values are the same, sometimes min can be lower but for
> the average the framerate should be what is in max.
> Should I set r_frame_rate to min?

I think if you do not know the base or average frame rate you
should not set it.
Or does this lead to some unreasonable latency ?
or are the computed values worse ?


> 
> I fixed all other parts you mentioned.
> 
> Felix
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to