[FFmpeg-cvslog] aviobuf: Fix warning about discarded qualifier

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jul 27 18:30:52 CEST 2012


On Fri, Jul 27, 2012 at 01:15:30PM +0200, jamal wrote:
> ffmpeg | branch: master | jamal <jamrial at gmail.com> | Fri Jul 27 05:23:23 2012 -0300| [c49e0d2cdd8b91161f4b8c22b130ab4bd6e71b71] | committer: Michael Niedermayer
> 
> aviobuf: Fix warning about discarded qualifier
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c49e0d2cdd8b91161f4b8c22b130ab4bd6e71b71
> ---
> 
>  libavformat/aviobuf.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index 05df001..f6a914a 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -122,7 +122,7 @@ AVIOContext *avio_alloc_context(
>  static void writeout(AVIOContext *s, const uint8_t *data, int len)
>  {
>      if (s->write_packet && !s->error){
> -        int ret= s->write_packet(s->opaque, data, len);
> +        int ret= s->write_packet(s->opaque, (uint8_t *)data, len);

Doesn't that rather just hide that the write_packet definition is
just wrong, or alternatively the code is wrong?
For example if writeout actually modifies the data using avio_write on a string
will crash if direct mode is used...


More information about the ffmpeg-cvslog mailing list