/* * section and descriptor parser * * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org) * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include struct atsc_eit_section *atsc_eit_section_codec(struct atsc_section_psip *psip) { uint8_t * buf = (uint8_t *) psip; size_t pos = 0; size_t len = section_ext_length(&(psip->ext_head)); int idx; if (len < sizeof(struct atsc_eit_section)) return NULL; struct atsc_eit_section *eit = (struct atsc_eit_section *) psip; pos += sizeof(struct atsc_eit_section); for(idx =0; idx < eit->num_events_in_section; idx++) { if (len < (pos + sizeof(struct atsc_eit_event))) return NULL; struct atsc_eit_event *event = (struct atsc_eit_event *) (buf+pos); bswap16(buf+pos); bswap32(buf+pos+2); bswap32(buf+pos+6); pos += sizeof(struct atsc_eit_event); if (len < (pos + event->title_length)) return NULL; if (atsc_text_validate(buf+pos, event->title_length)) return NULL; pos += event->title_length; if (len < (pos + sizeof(struct atsc_eit_event_part2))) return NULL; struct atsc_eit_event_part2 *part2 = (struct atsc_eit_event_part2 *) (buf+pos); bswap16(buf+pos); pos += sizeof(struct atsc_eit_event_part2); if (len < (pos + part2->descriptors_length)) return NULL; if (verify_descriptors(buf + pos, part2->descriptors_length)) return NULL; pos += part2->descriptors_length; } if (pos != len) return NULL; return (struct atsc_eit_section *) psip; } 1c3b0e31062f1639228d147&follow=1'>root/config.guess (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2004-03-14[lcd4linux @ 2004-03-14 07:11:42 by reinelt]reinelt7-42/+270
2004-03-14[lcd4linux @ 2004-03-14 06:07:33 by reinelt]reinelt2-2/+2
2004-03-13[lcd4linux @ 2004-03-13 19:06:01 by reinelt]reinelt3-5/+96
2004-03-13[lcd4linux @ 2004-03-13 14:58:15 by nicowallmeier]nicowallmeier1-4/+7
2004-03-13[lcd4linux @ 2004-03-13 14:55:14 by nicowallmeier]nicowallmeier1-3/+6
2004-03-13[lcd4linux @ 2004-03-13 06:55:29 by reinelt]reinelt1-58/+0
2004-03-13[lcd4linux @ 2004-03-13 06:49:20 by reinelt]reinelt7-247/+179
2004-03-12[lcd4linux @ 2004-03-12 13:58:14 by reinelt]reinelt1-468/+0
2004-03-11[lcd4linux @ 2004-03-11 06:39:58 by reinelt]reinelt16-133/+350
2004-03-10[lcd4linux @ 2004-03-10 07:16:15 by reinelt]reinelt7-149/+693
2004-03-08[lcd4linux @ 2004-03-08 18:46:21 by hejl]hejl1-3/+6
2004-03-08[lcd4linux @ 2004-03-08 18:45:52 by hejl]hejl1-4/+7
2004-03-08[lcd4linux @ 2004-03-08 16:26:26 by reinelt]reinelt5-14/+46
2004-03-08[lcd4linux @ 2004-03-08 04:33:08 by reinelt]reinelt1-21/+41
2004-03-06[lcd4linux @ 2004-03-06 20:31:16 by reinelt]reinelt12-640/+946
2004-03-03[lcd4linux @ 2004-03-03 08:40:07 by hejl]hejl1-1/+6
2004-03-03[lcd4linux @ 2004-03-03 04:44:16 by reinelt]reinelt13-63/+96
2004-03-03[lcd4linux @ 2004-03-03 03:47:04 by reinelt]reinelt46-167/+770
2004-03-03[lcd4linux @ 2004-03-03 03:41:02 by reinelt]reinelt1-9/+11
2004-03-01[lcd4linux @ 2004-03-01 04:29:51 by reinelt]reinelt4-24/+55
2004-02-29[lcd4linux @ 2004-02-29 17:09:53 by reinelt]reinelt5-15/+226
2004-02-29[lcd4linux @ 2004-02-29 14:30:59 by reinelt]reinelt1-2/+10
2004-02-27[lcd4linux @ 2004-02-27 07:06:24 by reinelt]reinelt5-11/+200
2004-02-27[lcd4linux @ 2004-02-27 06:07:55 by reinelt]reinelt2-21/+40
2004-02-26[lcd4linux @ 2004-02-26 21:42:45 by reinelt]reinelt1-3/+12