[FFmpeg-devel] [PATCH] Disable puts and change it to av_log
Michael Niedermayer
michaelni
Thu Jan 17 01:12:01 CET 2008
On Wed, Jan 16, 2008 at 11:28:08PM +0100, Diego Biurrun wrote:
> On Wed, Jan 16, 2008 at 11:12:29PM +0100, Michael Niedermayer wrote:
> > On Wed, Jan 16, 2008 at 10:40:31PM +0100, Diego Biurrun wrote:
> > > On Wed, Jan 16, 2008 at 09:15:51PM +0100, Michael Niedermayer wrote:
> > > > On Wed, Jan 16, 2008 at 07:55:33PM +0100, Sigbj?rn Skj?ret wrote:
> > > > > puts.diffs changes puts() to av_log() and puts2.diffs makes sure any further
> > > > > use of puts will fail to link.
> > > >
> > > > you missed libavcodec/mace.c
> > > >
> > > > either way
> > > > patches ok
> > >
> > > Here is a version with mace.c.
> > >
> > > --- libavformat/gif.c (revision 11540)
> > > +++ libavformat/gif.c (working copy)
> > > @@ -137,7 +137,7 @@
> > > //printf("bitbuf = %08x\n", bit_buf);
> > > s->buf_ptr+=4;
> > > if (s->buf_ptr >= s->buf_end)
> > > - puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
> > > + av_log(NULL,AV_LOG_WARNING,"bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
> > > // flush_buffer_rev(s);
> > > bit_cnt=bit_cnt + n - 32;
> > > if (bit_cnt == 0) {
> > > --- libavcodec/gif.c (revision 11540)
> > > +++ libavcodec/gif.c (working copy)
> > > @@ -136,7 +136,7 @@
> > >
> > > //printf("bitbuf = %08x\n", bit_buf);
> > > if (s->buf_ptr >= s->buf_end)
> > > - puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
> > > + av_log(NULL,AV_LOG_WARNING,"bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
> >
> > after reading this again these should be abort()s
> >
> > anyway this code is a mess (all the gif_put_bit should be removed)
>
> Sounds like this is outside of the scope of my patch then.
>
> > > --- libavcodec/mace.c (revision 11540)
> > > +++ libavcodec/mace.c (working copy)
> > > @@ -410,7 +410,7 @@
> > > case CODEC_ID_MACE3:
> > > #ifdef DEBUG
> > > -puts("mace_decode_frame[3]()");
> > > + av_log(avctx,AV_LOG_DEBUG,"mace_decode_frame[3]()");
> > > #endif
> >
> > dprintf
> >
> > > @@ -419,7 +419,7 @@
> > > case CODEC_ID_MACE6:
> > > #ifdef DEBUG
> > > -puts("mace_decode_frame[6]()");
> > > + av_log(avctx,AV_LOG_DEBUG, "mace_decode_frame[6]()");
> > > #endif
> >
> > dprintf
>
> Changed.
>
> Attached patch OK to commit then?
no
the code you add in mace.c is just wrong
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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/20080117/ba406eb8/attachment.pgp>
More information about the ffmpeg-devel
mailing list