Mercurial > libavformat.hg
changeset 2606:5fec787b0889 libavformat
simplify bitstream reading
author | aurel |
---|---|
date | Mon, 15 Oct 2007 22:47:41 +0000 |
parents | fb544409b242 |
children | cd9791623228 |
files | electronicarts.c |
diffstat | 1 files changed, 3 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/electronicarts.c Mon Oct 15 18:03:28 2007 +0000 +++ b/electronicarts.c Mon Oct 15 22:47:41 2007 +0000 @@ -83,22 +83,10 @@ EaDemuxContext *ea = s->priv_data; ByteIOContext *pb = &s->pb; - if (get_buffer(pb, (void*)&blockid, 4) != 4) { - return 0; - } - if (le2me_32(blockid) != SCHl_TAG) { + if (get_le32(pb) != SCHl_TAG) return 0; - } - - if (get_buffer(pb, (void*)&size, 4) != 4) { - return 0; - } - size = le2me_32(size); - - if (get_buffer(pb, (void*)&blockid, 4) != 4) { - return 0; - } - if (le2me_32(blockid) != PT00_TAG) { + size = get_le32(pb); + if (get_le32(pb) != PT00_TAG) { av_log (s, AV_LOG_ERROR, "PT header missing\n"); return 0; }