[MPlayer-dev-eng] Patch for Position indicator for MPEG over HTTP
Nico Sabbi
Nicola.Sabbi at poste.it
Fri Aug 24 17:11:19 CEST 2007
Johannes Deisenhofer wrote:
> Problem:
> When playing MPEG2 TS or PS-files over http, the OSD File-Position
> Indicator does not work.
>
> A simple proposed fix is attached.
>
> Jo
>
>
>------------------------------------------------------------------------
>
>Index: stream/http.c
>===================================================================
>--- stream/http.c (revision 24135)
>+++ stream/http.c (working copy)
>@@ -812,7 +812,11 @@
> char *content_length = NULL;
> mp_msg(MSGT_NETWORK,MSGL_V,"Content-Type: [%s]\n", content_type );
> if( (content_length = http_get_field(http_hdr, "Content-Length")) != NULL)
>- mp_msg(MSGT_NETWORK,MSGL_V,"Content-Length: [%s]\n", http_get_field(http_hdr, "Content-Length"));
>+ {
>+ off_t cl=(off_t)atol(content_length);
>+ mp_msg(MSGT_NETWORK,MSGL_V,"Content-Length: [%ld]\n", (long)cl);
>+ stream->end_pos=cl;
>+ }
> // Check in the mime type table for a demuxer type
> i = 0;
> while(mime_type_table[i].mime_type != NULL) {
>
>
sizeof(off_t) may be != sizeof(long), but this patch is good enough for me
More information about the MPlayer-dev-eng
mailing list