Changeset 3365
- Timestamp:
- 2008-01-20 17:36:51 (11 months ago)
- Files:
-
- liboggz/trunk/src/examples/modify-headers.c (modified) (1 diff)
- liboggz/trunk/src/liboggz/oggz_auto.c (modified) (3 diffs)
- liboggz/trunk/src/liboggz/oggz_private.h (modified) (1 diff)
- liboggz/trunk/src/liboggz/oggz_write.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
liboggz/trunk/src/examples/modify-headers.c
r3363 r3365 95 95 "EDITOR", "modify-headers"); 96 96 op = oggz_comment_generate (mhdata->writer, serialno, 97 oggz_stream_get_content (mhdata-> reader, serialno),97 oggz_stream_get_content (mhdata->writer, serialno), 98 98 0); 99 99 } liboggz/trunk/src/liboggz/oggz_auto.c
r3364 r3365 893 893 }; 894 894 895 int896 oggz_auto_identify _page (OGGZ *oggz, ogg_page *og, long serialno)895 static int 896 oggz_auto_identify (OGGZ * oggz, long serialno, unsigned char * data, long len) 897 897 { 898 898 int i; … … 902 902 const oggz_auto_contenttype_t *codec = oggz_auto_codec_ident + i; 903 903 904 if ( og->body_len >= codec->bos_str_len &&905 memcmp (og->body, codec->bos_str, codec->bos_str_len) == 0) {904 if (len >= codec->bos_str_len && 905 memcmp (data, codec->bos_str, codec->bos_str_len) == 0) { 906 906 907 907 oggz_stream_set_content (oggz, serialno, i); … … 913 913 oggz_stream_set_content (oggz, serialno, OGGZ_CONTENT_UNKNOWN); 914 914 return 0; 915 } 916 917 int 918 oggz_auto_identify_page (OGGZ * oggz, ogg_page *og, long serialno) 919 { 920 return oggz_auto_identify (oggz, serialno, og->body, og->body_len); 921 } 922 923 int 924 oggz_auto_identify_packet (OGGZ * oggz, ogg_packet * op, long serialno) 925 { 926 return oggz_auto_identify (oggz, serialno, op->packet, op->bytes); 915 927 } 916 928 liboggz/trunk/src/liboggz/oggz_private.h
r3364 r3365 292 292 293 293 int oggz_auto_identify_page (OGGZ *oggz, ogg_page *og, long serialno); 294 int oggz_auto_identify_packet (OGGZ * oggz, ogg_packet * op, long serialno); 294 295 295 296 /* comments */ liboggz/trunk/src/liboggz/oggz_write.c
r3324 r3365 248 248 if (b_o_s || !strict || suffix) { 249 249 stream = oggz_add_stream (oggz, serialno); 250 oggz_auto_identify_packet (oggz, op, serialno); 250 251 } else { 251 252 return OGGZ_ERR_BAD_SERIALNO;