On Wed, Aug 27, 2014 at 07:58:53PM -0700, Timothy Gu wrote: > On Wed, Aug 27, 2014 at 7:28 PM, Michael Niedermayer <michae...@gmx.at> wrote: > > On Wed, Aug 27, 2014 at 06:17:36PM -0700, Timothy Gu wrote: > >> Michael Niedermayer <g...@videolan.org> writes: > >> > >> > > >> > ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Wed > >> > Aug 27 23:53:53 2014 +0200| > >> > [e6516944a3d504f208911033b31afedb3d427267] | committer: Michael > >> > Niedermayer > >> > > >> > avformat/rtpdec_asf: fix compiler warning about const qualifier being > >> > discarded > >> > > >> > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > >> > > >> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6516944a3d504f208911033b31afedb3d427267 > >> > --- > >> > > >> > libavformat/rtpdec_asf.c | 2 +- > >> > 1 file changed, 1 insertion(+), 1 deletion(-) > >> > > >> > diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c > >> > index 541b86f..8e19654 100644 > >> > --- a/libavformat/rtpdec_asf.c > >> > +++ b/libavformat/rtpdec_asf.c > >> > @@ -188,7 +188,7@@ static int asfrtp_parse_packet(AVFormatContext *s, > >> > PayloadContext *asf, > >> > > >> > av_freep(&asf->buf); > >> > > >> > >> > - ffio_init_context(pb, buf, len, 0, NULL, NULL, NULL, NULL); > >> > + ffio_init_context(pb, (uint8_t *)buf, len, 0, NULL, NULL, NULL, > >> > NULL); > >> > >> Wouldn't it be more correct to declare ffio_init_context's second > >> argument const? > > > > ffio_init_context() can also be used for writing > > Yes, but the function does not change *buf. > > See > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/aviobuf.c;h=9795ba46dfe5dc96ff303e4a5271da01d94ec7d9;hb=HEAD#l72 > > The function url_resetbuf() called in ffio_init_context() does not > change *buf either: > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/aviobuf.c;h=9795ba46dfe5dc96ff303e4a5271da01d94ec7d9;hb=HEAD#l819
buf is assigned to AVIOContext.buffer, which is written to by some functions using AVIOContext [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel