[FFmpeg-devel] NC camera patch

Michael Niedermayer michaelni
Wed Jan 14 21:33:56 CET 2009


On Mon, Jan 12, 2009 at 04:56:13PM -0500, nicolas martin wrote:
[...]
>>
>>
>>
>> [...]
>>> +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, 1, 25);
>>
>> is 25 always correct, if there are 30fps files than it is not correct ...
>
> Changed it for
> av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
>
> I suppose this is the standard way for MPEG4 streams

no, the timebase or framerate has to be set correctly if it is stored
in the file

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090114/e65b4086/attachment.pgp>



More information about the ffmpeg-devel mailing list