[FFmpeg-devel] [PATCH] http: add support for reading streamcast metadata

wm4 nfxjfg at googlemail.com
Sat Jun 29 16:38:57 CEST 2013


On Sat, 29 Jun 2013 02:06:41 +0200
Stefano Sabatini <stefasab at gmail.com> wrote:

> > +    int icy_metaint;        /**< new metadata packet after that
> > many bytes of data read */  
> 
> uh? Still can't get what it is from the description. From my
> unerstanding: specify after how many bytes of read data a new
> metadata packet will be found
> 
> Is that correct?

Yes. I replaced my comment with your exact wording. I think it's better.

> Also nit: ///<
> is the prevailing convention

OK changed it, but now it's inconsistent with the surrounding code.

> > +    if (!has_header(s->headers, "\r\nIcy-MetaData: ") && s->icy) {
> > +        len += av_strlcatf(headers + len, sizeof(headers) - len,
> > +                           "Icy-MetaData: %d\r\n", 1);
> > +    }
> 
> why this?

It requests icy metadata from the server. It isn't sent by default,
because that would mean clients which do not support this will receive
corrupted data (proper data interleaved with unexpected metadata
packets).

> > +                av_freep(&s->icy_metadata_packet);
> > +                s->icy_metadata_packet = buf;
> 
> av_opt_set?

OK. I hope it's ok to propagate the returned error code.

Also changed some other code to use av_asprintf() as suggested by
ubitux on IRC.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-http-add-support-for-reading-streamcast-metadata.patch
Type: text/x-patch
Size: 6899 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130629/e9db7003/attachment.bin>


More information about the ffmpeg-devel mailing list