History

avcodec/noise_bsf: remove superfluous fail label

James Almer committed 6 years ago

Commit c75f2461 parent ec2a8e31 file · +6 −7Browse files

Unified · Split

libavcodec/noise_bsf.c+6−7
@@ -39,7 +39,7 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt) · 38 unmodified lines
3939 {
4040 NoiseContext *s = ctx->priv_data;
4141 int amount = s->amount > 0 ? s->amount : (s->state % 10001 + 1);
42− int i, ret = 0;
42+ int i, ret;
4343
4444 if (amount <= 0)
4545 return AVERROR(EINVAL);
@@ -55,19 +55,18 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt) · 9 unmodified lines
5555 }
5656
5757 ret = av_packet_make_writable(pkt);
58− if (ret < 0)
59− goto fail;
58+ if (ret < 0) {
59+ av_packet_unref(pkt);
60+ return ret;
61+ }
6062
6163 for (i = 0; i < pkt->size; i++) {
6264 s->state += pkt->data[i] + 1;
6365 if (s->state % amount == 0)
6466 pkt->data[i] = s->state;
6567 }
66−fail:
67− if (ret < 0)
68− av_packet_unref(pkt);
6968
70− return ret;
69+ return 0;
7170 }
7271
7372 #define OFFSET(x) offsetof(NoiseContext, x)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t