comparison dvdsub_parser.c @ 5399:27b3ee661472 libavcodec

Update the dvdsub parser to be able to parse HD-DVD subtitle packets. Patch by: Ian Caulfield, ian caulfield & gmx at
author takis
date Tue, 24 Jul 2007 14:17:13 +0000
parents 0d1cc37d9430
children 2acf0ae7b041
comparison
equal deleted inserted replaced
5398:392483301260 5399:27b3ee661472
41 41
42 if (pc->packet_index == 0) { 42 if (pc->packet_index == 0) {
43 if (buf_size < 2) 43 if (buf_size < 2)
44 return 0; 44 return 0;
45 pc->packet_len = AV_RB16(buf); 45 pc->packet_len = AV_RB16(buf);
46 if (pc->packet_len == 0) /* HD-DVD subpicture packet */
47 pc->packet_len = AV_RB32(buf+2);
46 av_freep(&pc->packet); 48 av_freep(&pc->packet);
47 pc->packet = av_malloc(pc->packet_len); 49 pc->packet = av_malloc(pc->packet_len);
48 } 50 }
49 if (pc->packet) { 51 if (pc->packet) {
50 if (pc->packet_index + buf_size <= pc->packet_len) { 52 if (pc->packet_index + buf_size <= pc->packet_len) {