Mercurial > libavformat.hg
comparison mmst.c @ 6293:130d730d1c5e libavformat
Explicitely set the size of the "ff_asf_head1_guid" header chunk, this is
part of the spec and causes problems otherwise.
Patch by Zhentan Feng <spyfeng gmail com>.
author | rbultje |
---|---|
date | Tue, 20 Jul 2010 15:11:44 +0000 |
parents | 54715a725139 |
children | 43d0fb52419d |
comparison
equal
deleted
inserted
replaced
6292:54715a725139 | 6293:130d730d1c5e |
---|---|
18 * | 18 * |
19 * You should have received a copy of the GNU Lesser General Public | 19 * You should have received a copy of the GNU Lesser General Public |
20 * License along with FFmpeg; if not, write to the Free Software | 20 * License along with FFmpeg; if not, write to the Free Software |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | 22 */ |
23 | |
24 /* References | |
25 * MMS protocol specification: | |
26 * [1]http://msdn.microsoft.com/en-us/library/cc234711(PROT.10).aspx | |
27 * ASF specification. Revision 01.20.03. | |
28 * [2]http://msdn.microsoft.com/en-us/library/bb643323.aspx | |
29 */ | |
30 | |
23 #include "avformat.h" | 31 #include "avformat.h" |
24 #include "internal.h" | 32 #include "internal.h" |
25 #include "libavutil/intreadwrite.h" | 33 #include "libavutil/intreadwrite.h" |
26 #include "libavcodec/bytestream.h" | 34 #include "libavcodec/bytestream.h" |
27 #include "network.h" | 35 #include "network.h" |
471 mms->stream_num++; | 479 mms->stream_num++; |
472 } else { | 480 } else { |
473 dprintf(NULL, "Too many streams.\n"); | 481 dprintf(NULL, "Too many streams.\n"); |
474 return -1; | 482 return -1; |
475 } | 483 } |
484 } else if (!memcmp(p, ff_asf_head1_guid, sizeof(ff_asf_guid))) { | |
485 chunksize = 46; // see references [2] section 3.4. This should be set 46. | |
476 } | 486 } |
477 p += chunksize; | 487 p += chunksize; |
478 } | 488 } |
479 | 489 |
480 return 0; | 490 return 0; |