[FFmpeg-devel] [PATCH] mpeg12: fix non-standard use of "extern inline"

Mans Rullgard mans
Sat May 16 15:16:28 CEST 2009


Rename ff_mpeg1_decode_block_intra to mpeg1_decode_block_intra and
make it static.  Add ff_mpeg1_decode_block_intra as plain extern
function calling mpeg1_decode_block_intra.
---
 libavcodec/mpeg12.c |   11 +++++++++--
 libavcodec/mpeg12.h |    2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 44a1d98..c649948 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -320,7 +320,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
             }
         } else {
             for(i=0;i<6;i++) {
-                if (ff_mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0)
+                if (mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0)
                     return -1;
             }
         }
@@ -605,7 +605,7 @@ static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred)
     return val;
 }
 
-inline int ff_mpeg1_decode_block_intra(MpegEncContext *s,
+static inline int mpeg1_decode_block_intra(MpegEncContext *s,
                                DCTELEM *block,
                                int n)
 {
@@ -678,6 +678,13 @@ inline int ff_mpeg1_decode_block_intra(MpegEncContext *s,
    return 0;
 }
 
+int ff_mpeg1_decode_block_intra(MpegEncContext *s,
+                                DCTELEM *block,
+                                int n)
+{
+    return mpeg1_decode_block_intra(s, block, n);
+}
+
 static inline int mpeg1_decode_block_inter(MpegEncContext *s,
                                DCTELEM *block,
                                int n)
diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h
index dbbe8e4..30bb675 100644
--- a/libavcodec/mpeg12.h
+++ b/libavcodec/mpeg12.h
@@ -56,6 +56,6 @@ static inline int decode_dc(GetBitContext *gb, int component)
     return diff;
 }
 
-extern inline int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n);
+extern int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n);
 
 #endif /* AVCODEC_MPEG12_H */
-- 
1.6.3.1




More information about the ffmpeg-devel mailing list