On 10/06/2012 09:35 PM, Ronald S. Bultje wrote: > Hi, >> @@ -629,9 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int >> stream_idx) >> rational_string(val_str, sizeof(val_str), ":", >> &display_aspect_ratio)); >> } >> - probe_str("pix_fmt", >> - dec_ctx->pix_fmt != AV_PIX_FMT_NONE ? >> - av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : >> "unknown"); >> + desc = av_pix_fmt_desc_get(dec_ctx->pix_fmt); > > I think this is an awful idea, it should be OK to access the array directly.
Why? You could provide a setting function if you think we should provide a way to add entries on the fly (and remove them), beside that the getter addresses the normal needs nicely IMHO. lu _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel