[FFmpeg-devel] [PATCH] RTSP-MS 14/15: ASF packet parsing

Michael Niedermayer michaelni
Wed Apr 22 15:24:31 CEST 2009


On Wed, Apr 22, 2009 at 07:39:07AM -0400, Ronald S. Bultje wrote:
> Hi Luca,
> 
> On Wed, Apr 22, 2009 at 3:21 AM, Luca Abeni <lucabe72 at email.it> wrote:
> > Regarding the payload buffer, the patch looks better than the last one,
> > but the code still looks quite convoluted:
> > + ? ? ? ?if (!(mflags & 0x40)) {
> > + ? ? ? ? ? ?if (!len_off && !asf->pktbuf) {
> > + ? ? ? ? ? ? ? ?if (!(res = url_open_dyn_buf(&asf->pktbuf)))
> > + ? ? ? ? ? ? ? ? ? ?return res;
> > + ? ? ? ? ? ?} else if (len_off != url_ftell(asf->pktbuf)) {
> > + ? ? ? ? ? ? ? ?uint8_t *p;
> > + ? ? ? ? ? ? ? ?url_close_dyn_buf(asf->pktbuf, &p);
> > [...]
> > + ? ? ? ?} else {
> > + ? ? ? ? ? ?asf->buf = av_malloc(len - off);
> > + ? ? ? ? ? ?asf->pos = len - off;
> > + ? ? ? ? ? ?memcpy(asf->buf, buf + off, len - off);
> > + ? ? ? ?}
> >
> > Unless microsoft is using standard headers and flags in a very
> > non-standard way, I think this code can be written in a much
> > simpler way.
> 
> I'll try to simpify. For the original version, do you "mind" if I just
> don't care about missing buffers etc. and discard everything that is
> not exactly in sync? I understand that eventually the idea is that
> out-of-order packets and missing packets are all handled, but is it OK
> if we don't in this first version?

lets get it working and clean first, then you will explain what would be
needed to make it deal with out of order and missing packets and
after that i can decide if i insist on that too before commit

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- 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/20090422/d8622e6d/attachment.pgp>



More information about the ffmpeg-devel mailing list