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
39{39{
40 NoiseContext *s = ctx->priv_data;40 NoiseContext *s = ctx->priv_data;
41 int amount = s->amount > 0 ? s->amount : (s->state % 10001 + 1);41 int amount = s->amount > 0 ? s->amount : (s->state % 10001 + 1);
42 int i, ret = 0;42 int i, ret;
43 43
44 if (amount <= 0)44 if (amount <= 0)
45 return AVERROR(EINVAL);45 return AVERROR(EINVAL);
@@ -55,19 +55,18 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt) · 9 unmodified lines
55 }55 }
56 56
57 ret = av_packet_make_writable(pkt);57 ret = av_packet_make_writable(pkt);
58 if (ret < 0)58 if (ret < 0) {
59 goto fail;59 av_packet_unref(pkt);
60 return ret;
61 }
60 62
61 for (i = 0; i < pkt->size; i++) {63 for (i = 0; i < pkt->size; i++) {
62 s->state += pkt->data[i] + 1;64 s->state += pkt->data[i] + 1;
63 if (s->state % amount == 0)65 if (s->state % amount == 0)
64 pkt->data[i] = s->state;66 pkt->data[i] = s->state;
65 }67 }
66fail:
67 if (ret < 0)
68 av_packet_unref(pkt);
69 68
70 return ret;69 return 0;
71}70}
72 71
73#define OFFSET(x) offsetof(NoiseContext, x)72#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