[FFmpeg-devel] [PATCH 7/8] In avcodec_pix_fmt_string() use local variable pixdesc rather than av_pix_fmt_descriptors[pix_fmt], simplify.

Stefano Sabatini stefano.sabatini-lala
Fri Nov 5 12:01:48 CET 2010


---
 libavcodec/imgconvert.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 0c30304..3465d5b 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -445,9 +445,9 @@ void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt)
 
         snprintf (buf, buf_size,
                   "%-11s %5d %7d",
-                  av_pix_fmt_descriptors[pix_fmt].name,
+                  pixdesc->name,
                   nb_planes,
-                  av_get_bits_per_pixel(&av_pix_fmt_descriptors[pix_fmt])
+                  av_get_bits_per_pixel(pixdesc)
             );
     }
 }
-- 
1.7.1




More information about the ffmpeg-devel mailing list