[FFmpeg-devel] [PATCH] Put strings inside struct instead of extra indirection.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 4 17:06:54 CET 2011


Saves a bit on space and relocations.
Also makes the (very hackish) lossless conversion check
in ffmpeg.c work reliably.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavutil/samplefmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index 6f7070e..bdbbf0a 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -23,7 +23,7 @@
 #include <string.h>
 
 typedef struct SampleFmtInfo {
-    const char *name;
+    char name[4];
     int bits;
 } SampleFmtInfo;
 
-- 
1.7.7.1



More information about the ffmpeg-devel mailing list