Skip to content
Snippets Groups Projects
Commit c46000c1 authored by Zhentan Feng's avatar Zhentan Feng Committed by Ronald S. Bultje
Browse files

Set fixed chunksize for ASF header in MMS streams, as per MSDN documentation.

This fixes playback of at least one MMST stream.

Patch by Zhentan Feng <spyfeng gmail com>.

Originally committed as revision 24793 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 99ab8ff0
Branches
Tags
No related merge requests found
...@@ -68,7 +68,12 @@ int ff_mms_asf_header_parser(MMSContext *mms) ...@@ -68,7 +68,12 @@ int ff_mms_asf_header_parser(MMSContext *mms)
p += sizeof(ff_asf_guid) + 14; p += sizeof(ff_asf_guid) + 14;
while(end - p >= sizeof(ff_asf_guid) + 8) { while(end - p >= sizeof(ff_asf_guid) + 8) {
uint64_t chunksize = AV_RL64(p + sizeof(ff_asf_guid)); uint64_t chunksize;
if (!memcmp(p, ff_asf_data_header, sizeof(ff_asf_guid))) {
chunksize = 50; // see Reference [2] section 5.1
} else {
chunksize = AV_RL64(p + sizeof(ff_asf_guid));
}
if (!chunksize || chunksize > end - p) { if (!chunksize || chunksize > end - p) {
av_log(NULL, AV_LOG_ERROR, av_log(NULL, AV_LOG_ERROR,
"Corrupt stream (header chunksize %"PRId64" is invalid)\n", "Corrupt stream (header chunksize %"PRId64" is invalid)\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment