[FFmpeg-cvslog] doc/examples/muxing: Remove unnecessary ret
Jun Zhao
git at videolan.org
Sat Oct 29 07:27:42 EEST 2022
ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Sat Oct 22 10:46:03 2022 +0800| [3497362be18ec1f7b1e675209da2a9e5b4a585f7] | committer: Jun Zhao
doc/examples/muxing: Remove unnecessary ret
Remove unnecessary ret and make the code more compact
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3497362be18ec1f7b1e675209da2a9e5b4a585f7
---
doc/examples/muxing.c | 5 +----
1 file changed, 1 insertion(+), 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);
}
More information about the ffmpeg-cvslog
mailing list