[FFmpeg-devel] NC camera patch (last round hopefully)
Tue Jan 20 21:11:43 CET 2009
On Thu, Jan 15, 2009 at 04:55:39PM -0500, nicolas martin wrote:
> Hi everybody !
> I sent a patch a few days ago, I didn't receive much comments except I was
> harcoding the fps of my video decoder.
> The stream is MPEG-4 but I don't know if there is a standard way of
> finding/estimating the fps in such feeds.
> If there is one, can somebody please help me in doing so ...
> Once this is done, I don't think there will be much to do for my patch to
> be accepted, so I'll stop bugging you around and will be happy :)
> Thanks again everyone.
> I re-attached my patch as I think it is not that big !
> +static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap)
> + AVStream *st = av_new_stream(s, 0);
> + if (!st)
> + return AVERROR(ENOMEM);
> + st->codec->codec_type = CODEC_TYPE_VIDEO;
> + st->codec->codec_id = CODEC_ID_MPEG4;
> + st->need_parsing = AVSTREAM_PARSE_FULL;
> + av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
the timebase of the file you posted is 1/100
we could assume that all use this
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel