[FFmpeg-devel] [Patch] Store some ASF header data in AVFormatContext
Björn Axelsson
bjorn.axelsson
Fri Aug 17 11:30:17 CEST 2007
On Thu, 2007-08-16 at 13:54 +0200, Michael Niedermayer wrote:
> 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.
> >
> > 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
My apologies. I should have read further than the doxygen short
description.
My original reason for this patch is that for some cases when streaming,
the information may be needed before av_find_stream_info() is called. I
will find another way to deal with it.
--
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
More information about the ffmpeg-devel
mailing list