summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2022-10-22 10:46:03 +0800
committerJun Zhao <barryjzhao@tencent.com>2022-10-29 12:26:30 +0800
commit3497362be18ec1f7b1e675209da2a9e5b4a585f7 (patch)
treee5be78090a3150ce294250e67be02a60a7c611ee /doc/examples
parent79508ee5231f66fa8333311da3725fe53f2dafea (diff)
downloadffmpeg-3497362be18ec1f7b1e675209da2a9e5b4a585f7.tar.gz
doc/examples/muxing: Remove unnecessary ret
Remove unnecessary ret and make the code more compact Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/muxing.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 3acb778322..cd997d5431 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -219,8 +219,6 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt,
int sample_rate, int nb_samples)
{
AVFrame *frame = av_frame_alloc();
- int ret;
-
if (!frame) {
fprintf(stderr, "Error allocating an audio frame\n");
exit(1);
@@ -232,8 +230,7 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt,
frame->nb_samples = nb_samples;
if (nb_samples) {
- ret = av_frame_get_buffer(frame, 0);
- if (ret < 0) {
+ if (av_frame_get_buffer(frame, 0) < 0) {
fprintf(stderr, "Error allocating an audio buffer\n");
exit(1);
}