[FFmpeg-cvslog] avcodec/h261enc: Avoid casts, Simplify code
Michael Niedermayer
michaelni at gmx.at
Sun Feb 1 19:21:42 CET 2015
On Sat, Jan 31, 2015 at 08:20:55PM +0100, Reimar Döffinger wrote:
> On 31.01.2015, at 20:00, git at videolan.org (Michael Niedermayer) wrote:
> > ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 31 19:49:28 2015 +0100| [b9c3f041e029ccb5c0462fb46eb8b95f69cd9a9c] | committer: Michael Niedermayer
> >
> > avcodec/h261enc: Avoid casts, Simplify code
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> >
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9c3f041e029ccb5c0462fb46eb8b95f69cd9a9c
> > ---
> >
> > libavcodec/h261enc.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
> > index d7b56a8..87eb94f 100644
> > --- a/libavcodec/h261enc.c
> > +++ b/libavcodec/h261enc.c
> > @@ -61,8 +61,8 @@ void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number)
> >
> > put_bits(&s->pb, 20, 0x10); /* PSC */
> >
> > - temp_ref = s->picture_number * (int64_t)30000 * s->avctx->time_base.num /
> > - (1001 * (int64_t)s->avctx->time_base.den); // FIXME maybe this should use a timestamp
> > + temp_ref = s->picture_number * 30000L * s->avctx->time_base.num /
> > + (1001L * s->avctx->time_base.den); // FIXME maybe this should use a timestamp
> > put_sbits(&s->pb, 5, temp_ref); /* TemporalReference */
>
> Huh? These aren't the same, long is 32 bits on both 32 bit systems and Windows in general.
> Did you mean to use LL?
yes, fixed
thanks alot for spotting this one
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20150201/12829724/attachment.asc>
More information about the ffmpeg-cvslog
mailing list