mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
Minor modifications to handle mms streaming.
Patch by Ryan Martell rdm4 martellventures com. Originally committed as revision 7221 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4a1bb6196b
commit
73fe1052dd
@ -203,8 +203,10 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
goto fail;
|
goto fail;
|
||||||
st->priv_data = asf_st;
|
st->priv_data = asf_st;
|
||||||
st->start_time = asf->hdr.preroll;
|
st->start_time = asf->hdr.preroll;
|
||||||
st->duration = asf->hdr.send_time /
|
if(!(asf->hdr.flags & 0x01)) { // if we aren't streaming...
|
||||||
(10000000 / 1000) - st->start_time;
|
st->duration = asf->hdr.send_time /
|
||||||
|
(10000000 / 1000) - st->start_time;
|
||||||
|
}
|
||||||
get_guid(pb, &g);
|
get_guid(pb, &g);
|
||||||
|
|
||||||
test_for_ext_stream_audio = 0;
|
test_for_ext_stream_audio = 0;
|
||||||
@ -328,7 +330,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
url_fskip(pb, gsize - (pos2 - pos1 + 24));
|
url_fskip(pb, gsize - (pos2 - pos1 + 24));
|
||||||
} else if (!memcmp(&g, &data_header, sizeof(GUID))) {
|
} else if (!memcmp(&g, &data_header, sizeof(GUID))) {
|
||||||
asf->data_object_offset = url_ftell(pb);
|
asf->data_object_offset = url_ftell(pb);
|
||||||
if (gsize != (uint64_t)-1 && gsize >= 24) {
|
// if not streaming, gsize is not unlimited (how?), and there is enough space in the file..
|
||||||
|
if (!(asf->hdr.flags & 0x01) && gsize != (uint64_t)-1 && gsize >= 24) {
|
||||||
asf->data_object_size = gsize - 24;
|
asf->data_object_size = gsize - 24;
|
||||||
} else {
|
} else {
|
||||||
asf->data_object_size = (uint64_t)-1;
|
asf->data_object_size = (uint64_t)-1;
|
||||||
|
@ -86,7 +86,7 @@ typedef struct {
|
|||||||
int asfid2avid[128]; /* conversion table from asf ID 2 AVStream ID */
|
int asfid2avid[128]; /* conversion table from asf ID 2 AVStream ID */
|
||||||
ASFStream streams[128]; /* it's max number and it's not that big */
|
ASFStream streams[128]; /* it's max number and it's not that big */
|
||||||
/* non streamed additonnal info */
|
/* non streamed additonnal info */
|
||||||
int64_t nb_packets;
|
uint64_t nb_packets;
|
||||||
int64_t duration; /* in 100ns units */
|
int64_t duration; /* in 100ns units */
|
||||||
/* packet filling */
|
/* packet filling */
|
||||||
unsigned char multi_payloads_present;
|
unsigned char multi_payloads_present;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user