summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2003-02-25 13:12:41 +0000
committerFrançois Revol <revol@free.fr>2003-02-25 13:12:41 +0000
commit5082f759e0d02b26e1b4dba8341d516079cfb115 (patch)
tree5c838143191acb2474b4105b5484598b42fbd45b /libavformat
parentdee076fcb71701e9f17cb8cdc0738fc9cd93c276 (diff)
prettier debug output
Originally committed as revision 1607 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asf.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c
index e3d5883ba6..4d4c74571f 100644
--- a/libavformat/asf.c
+++ b/libavformat/asf.c
@@ -659,14 +659,36 @@ static int asf_write_trailer(AVFormatContext *s)
//#define DEBUG
#ifdef DEBUG
+#define PRINT_IF_GUID(g,cmp) \
+if (!memcmp(g, &cmp, sizeof(GUID))) \
+ printf("(GUID: %s) ", #cmp)
+
static void print_guid(const GUID *g)
{
int i;
+ PRINT_IF_GUID(g, asf_header);
+ else PRINT_IF_GUID(g, file_header);
+ else PRINT_IF_GUID(g, stream_header);
+ else PRINT_IF_GUID(g, audio_stream);
+ else PRINT_IF_GUID(g, audio_conceal_none);
+ else PRINT_IF_GUID(g, video_stream);
+ else PRINT_IF_GUID(g, video_conceal_none);
+ else PRINT_IF_GUID(g, comment_header);
+ else PRINT_IF_GUID(g, codec_comment_header);
+ else PRINT_IF_GUID(g, codec_comment1_header);
+ else PRINT_IF_GUID(g, data_header);
+ else PRINT_IF_GUID(g, index_guid);
+ else PRINT_IF_GUID(g, head1_guid);
+ else PRINT_IF_GUID(g, head2_guid);
+ else PRINT_IF_GUID(g, my_guid);
+ else
+ printf("(GUID: unknown) ");
printf("0x%08x, 0x%04x, 0x%04x, {", g->v1, g->v2, g->v3);
for(i=0;i<8;i++)
printf(" 0x%02x,", g->v4[i]);
printf("}\n");
}
+#undef PRINT_IF_GUID(g,cmp)
#endif
static void get_guid(ByteIOContext *s, GUID *g)