[FFmpeg-devel] [Patch] Store some ASF header data in AVFormatContext

Michael Niedermayer michaelni
Thu Aug 16 13:54:39 CEST 2007


Hi

On Thu, Aug 16, 2007 at 09:54:35AM +0200, Bj?rn Axelsson wrote:
> Copies some additional data (start_time, duration, packet_size and
> file_size) from the parsed ASF header into the AVFormatContext. 
> 
> -- 
> Bj?rn Axelsson                    Phone: +46-(0)90-18 98 97
> Intinor AB                          Fax: +46-(0)920-757 10
> www.intinor.se
> Interactive Television & Digital Media Distribution

> Index: asf.c
> ===================================================================
> --- asf.c	(revision 10006)
> +++ asf.c	(arbetskopia)
> @@ -192,6 +192,13 @@
>              asf->hdr.max_pktsize        = get_le32(pb);
>              asf->hdr.max_bitrate        = get_le32(pb);
>              asf->packet_size = asf->hdr.max_pktsize;
> +
> +            s->start_time = asf->hdr.preroll / (10000000 / AV_TIME_BASE);
> +            s->duration = (asf->hdr.send_time - asf->hdr.preroll) / (10000000 / AV_TIME_BASE);

can you read? it seems not
typedef struct AVFormatContext {
[...]
    /** decoding: position of the first frame of the component, in
       AV_TIME_BASE fractional seconds. NEVER set this value directly:
       it is deduced from the AVStream values.  */
    int64_t start_time;
    /** decoding: duration of the stream, in AV_TIME_BASE fractional
       seconds. NEVER set this value directly: it is deduced from the
       AVStream values.  */
    int64_t duration;

patch rejected

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070816/9eebd8ac/attachment.pgp>



More information about the ffmpeg-devel mailing list