[libav-devel] [PATCH][RELEASE/0.8] sgidec: fix an incorrect backport

Sean McGovern gseanmcg at gmail.com
Tue Jun 3 00:35:25 CEST 2014


---
Same story, different branch.
---
 libavcodec/sgidec.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 13f505a..6aaa514 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -246,6 +246,8 @@ static int decode_frame(AVCodecContext *avctx,
 static av_cold int sgi_init(AVCodecContext *avctx){
     SgiState *s = avctx->priv_data;
 
+    s->avctx = avctx;
+
     avcodec_get_frame_defaults(&s->picture);
     avctx->coded_frame = &s->picture;
 
@@ -262,15 +264,6 @@ static av_cold int sgi_end(AVCodecContext *avctx)
     return 0;
 }
 
-static av_cold int sgi_decode_init(AVCodecContext *avctx)
-{
-    SgiState *s = avctx->priv_data;
-
-    s->avctx = avctx;
-
-    return 0;
-}
-
 AVCodec ff_sgi_decoder = {
     .name           = "sgi",
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -279,7 +272,6 @@ AVCodec ff_sgi_decoder = {
     .init           = sgi_init,
     .close          = sgi_end,
     .decode         = decode_frame,
-    .init           = sgi_decode_init,
     .long_name = NULL_IF_CONFIG_SMALL("SGI image"),
 };
 
-- 
1.7.9.2



More information about the libav-devel mailing list