Mercurial > libavformat.hg
comparison electronicarts.c @ 2674:feb0352f07e5 libavformat
don't use #define with names starting with _
author | aurel |
---|---|
date | Thu, 25 Oct 2007 21:10:18 +0000 |
parents | a9e2afed4aa7 |
children | 43ca0db0aa92 |
comparison
equal
deleted
inserted
replaced
2673:a9e2afed4aa7 | 2674:feb0352f07e5 |
---|---|
25 */ | 25 */ |
26 | 26 |
27 #include "avformat.h" | 27 #include "avformat.h" |
28 | 28 |
29 #define SCHl_TAG MKTAG('S', 'C', 'H', 'l') | 29 #define SCHl_TAG MKTAG('S', 'C', 'H', 'l') |
30 #define _SNh_TAG MKTAG('1', 'S', 'N', 'h') /* 1SNx header */ | 30 #define ISNh_TAG MKTAG('1', 'S', 'N', 'h') /* 1SNx header */ |
31 #define EACS_TAG MKTAG('E', 'A', 'C', 'S') | 31 #define EACS_TAG MKTAG('E', 'A', 'C', 'S') |
32 #define _SNd_TAG MKTAG('1', 'S', 'N', 'd') /* 1SNx data */ | 32 #define ISNd_TAG MKTAG('1', 'S', 'N', 'd') /* 1SNx data */ |
33 #define _SNe_TAG MKTAG('1', 'S', 'N', 'e') /* 1SNx end */ | 33 #define ISNe_TAG MKTAG('1', 'S', 'N', 'e') /* 1SNx end */ |
34 #define PT00_TAG MKTAG('P', 'T', 0x0, 0x0) | 34 #define PT00_TAG MKTAG('P', 'T', 0x0, 0x0) |
35 #define GSTR_TAG MKTAG('G', 'S', 'T', 'R') | 35 #define GSTR_TAG MKTAG('G', 'S', 'T', 'R') |
36 #define SCDl_TAG MKTAG('S', 'C', 'D', 'l') | 36 #define SCDl_TAG MKTAG('S', 'C', 'D', 'l') |
37 #define SCEl_TAG MKTAG('S', 'C', 'E', 'l') | 37 #define SCEl_TAG MKTAG('S', 'C', 'E', 'l') |
38 #define MVhd_TAG MKTAG('M', 'V', 'h', 'd') | 38 #define MVhd_TAG MKTAG('M', 'V', 'h', 'd') |
238 ea->big_endian = size > 0x000FFFFF; | 238 ea->big_endian = size > 0x000FFFFF; |
239 if (ea->big_endian) | 239 if (ea->big_endian) |
240 size = bswap_32(size); | 240 size = bswap_32(size); |
241 | 241 |
242 switch (blockid) { | 242 switch (blockid) { |
243 case _SNh_TAG: | 243 case ISNh_TAG: |
244 if (get_le32(pb) != EACS_TAG) { | 244 if (get_le32(pb) != EACS_TAG) { |
245 av_log (s, AV_LOG_ERROR, "unknown 1SNh headerid\n"); | 245 av_log (s, AV_LOG_ERROR, "unknown 1SNh headerid\n"); |
246 return 0; | 246 return 0; |
247 } | 247 } |
248 err = process_audio_header_eacs(s); | 248 err = process_audio_header_eacs(s); |
345 chunk_type = get_le32(pb); | 345 chunk_type = get_le32(pb); |
346 chunk_size = (ea->big_endian ? get_be32(pb) : get_le32(pb)) - 8; | 346 chunk_size = (ea->big_endian ? get_be32(pb) : get_le32(pb)) - 8; |
347 | 347 |
348 switch (chunk_type) { | 348 switch (chunk_type) { |
349 /* audio data */ | 349 /* audio data */ |
350 case _SNh_TAG: | 350 case ISNh_TAG: |
351 /* header chunk also contains data; skip over the header portion*/ | 351 /* header chunk also contains data; skip over the header portion*/ |
352 url_fskip(pb, 32); | 352 url_fskip(pb, 32); |
353 chunk_size -= 32; | 353 chunk_size -= 32; |
354 case _SNd_TAG: | 354 case ISNd_TAG: |
355 case SCDl_TAG: | 355 case SCDl_TAG: |
356 if (!ea->audio_codec) { | 356 if (!ea->audio_codec) { |
357 url_fskip(pb, chunk_size); | 357 url_fskip(pb, chunk_size); |
358 break; | 358 break; |
359 } | 359 } |
382 packet_read = 1; | 382 packet_read = 1; |
383 break; | 383 break; |
384 | 384 |
385 /* ending tag */ | 385 /* ending tag */ |
386 case 0: | 386 case 0: |
387 case _SNe_TAG: | 387 case ISNe_TAG: |
388 case SCEl_TAG: | 388 case SCEl_TAG: |
389 ret = AVERROR(EIO); | 389 ret = AVERROR(EIO); |
390 packet_read = 1; | 390 packet_read = 1; |
391 break; | 391 break; |
392 | 392 |