diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-12-15 20:09:26 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-12-15 20:09:26 +0100 |
commit | b2a4316287ea814168b0b794bd7ab0063fd1dd0f (patch) | |
tree | f3d76b37eca14f62815dfede962e2917c597fa93 /doc/examples | |
parent | 81eff6e7a20b81fb9928a9f370c290debadd2b47 (diff) | |
download | ffmpeg-b2a4316287ea814168b0b794bd7ab0063fd1dd0f.tar.gz |
examples/decoding_encoding: check av_samples_get_buffer_size() for a negative value
Fix broken != 0 check.
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/decoding_encoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c index 4d2813b052..08e8b9212c 100644 --- a/doc/examples/decoding_encoding.c +++ b/doc/examples/decoding_encoding.c @@ -170,7 +170,7 @@ static void audio_encode_example(const char *filename) * we calculate the size of the samples buffer in bytes */ buffer_size = av_samples_get_buffer_size(NULL, c->channels, c->frame_size, c->sample_fmt, 0); - if (!buffer_size) { + if (buffer_size < 0) { fprintf(stderr, "Could not get sample buffer size\n"); exit(1); } |