* commit '4310ba273d3bcb7f19a4e40b55b9e832568e56e5':
sgidec: fix an incorrect backport
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -249,6 +249,8 @@ static int decode_frame(AVCodecContext *avctx, |
249 | 249 |
static av_cold int sgi_init(AVCodecContext *avctx){ |
250 | 250 |
SgiState *s = avctx->priv_data; |
251 | 251 |
|
252 |
+ s->avctx = avctx; |
|
253 |
+ |
|
252 | 254 |
avcodec_get_frame_defaults(&s->picture); |
253 | 255 |
avctx->coded_frame = &s->picture; |
254 | 256 |
|
... | ... |
@@ -265,15 +267,6 @@ static av_cold int sgi_end(AVCodecContext *avctx) |
265 | 265 |
return 0; |
266 | 266 |
} |
267 | 267 |
|
268 |
-static av_cold int sgi_decode_init(AVCodecContext *avctx) |
|
269 |
-{ |
|
270 |
- SgiState *s = avctx->priv_data; |
|
271 |
- |
|
272 |
- s->avctx = avctx; |
|
273 |
- |
|
274 |
- return 0; |
|
275 |
-} |
|
276 |
- |
|
277 | 268 |
AVCodec ff_sgi_decoder = { |
278 | 269 |
.name = "sgi", |
279 | 270 |
.type = AVMEDIA_TYPE_VIDEO, |
... | ... |
@@ -283,6 +276,5 @@ AVCodec ff_sgi_decoder = { |
283 | 283 |
.close = sgi_end, |
284 | 284 |
.decode = decode_frame, |
285 | 285 |
.long_name = NULL_IF_CONFIG_SMALL("SGI image"), |
286 |
- .init = sgi_decode_init, |
|
287 | 286 |
.capabilities = CODEC_CAP_DR1, |
288 | 287 |
}; |