[FFmpeg-devel] [PATCH] Print error message when output buffer allocation fails

Michael Niedermayer michaelni
Sat Jun 13 20:22:49 CEST 2009


On Sat, Jun 13, 2009 at 01:12:33PM +0100, Mans Rullgard wrote:
> ---
>  ffmpeg.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index dcba31f..509be6e 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -1930,6 +1930,8 @@ static int av_encode(AVFormatContext **output_files,
>      if (!bit_buffer)
>          bit_buffer = av_malloc(bit_buffer_size);
>      if (!bit_buffer) {
> +        fprintf(stderr, "Cannot allocate %d bytes output buffer\n",
> +                bit_buffer_size);
>          ret = AVERROR(ENOMEM);
>          goto fail;
>      }

ok
[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20090613/8cfedf42/attachment.pgp>



More information about the ffmpeg-devel mailing list