[FFmpeg-devel] Patch update

Michael Niedermayer michaelni at gmx.at
Sat Mar 16 02:34:35 CET 2013


On Fri, Feb 22, 2013 at 02:37:42AM +0100, Clément Bœsch wrote:
> On Fri, Feb 22, 2013 at 01:25:40AM +0000, Colin NG wrote:
> > 
> > Hi all,
> > 
> > Here is my refined patch for ticket #2230. The patch fixes the failure to write out non-default metadata into segment‏ header in HLS creation.  Please review and give me feedback.
> > 
> 
> OK so it seems you need some little help:
> 
>  - Please do not top post here, it is considered rude. If you do not know
>    what it means, observe how people are exchanging mails on this
>    mailing-list. Also, Google may give you hints.
> 
>  - Your patch is not supposed to be encoded in base64
> 
>  - Your base64 mess includes a totally unrelated patch already upstream
>    for a strange reason.
> 
> Since all of this is getting quite frustrating for everybody, I believe
> what you want for review is the patch as attached to this mail.
> 
> Regards,
> 
> -- 
> Clément B.

>  segment.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 3920b59d0683fc49b8fbeca39a6718f95c9c90c6  0001-hls-Fix-the-failure-to-write-out-non-default-metadat.patch
> From 692ad5a3cd3a7181abca54c467b171540ab3a0b3 Mon Sep 17 00:00:00 2001
> From: Colin Ng <colin_ng at hotmail.com>
> Date: Thu, 21 Feb 2013 16:33:47 -0800
> Subject: [PATCH] hls: Fix the failure to write out non-default metadata into
>  segment header
> 
> ---
>  libavformat/segment.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  mode change 100644 => 100755 libavformat/segment.c
> 
> diff --git a/libavformat/segment.c b/libavformat/segment.c
> old mode 100644
> new mode 100755
> index 13d8c43..f6f397c
> --- a/libavformat/segment.c
> +++ b/libavformat/segment.c
> @@ -174,11 +174,23 @@ static int segment_start(AVFormatContext *s, int write_header)
>      int err = 0;
>  
>      if (write_header) {
> +
> +        AVDictionary *tmp = NULL;
> +
> +        if (av_dict_count(s->metadata) > 0) {
> +            av_dict_copy(&tmp, s->metadata, 0);
> +        } else if (av_dict_count(oc->metadata) > 0) {
> +            av_dict_copy(&tmp, oc->metadata, 0);
> +        }
> +
>          avformat_free_context(oc);
>          seg->avf = NULL;
>          if ((err = segment_mux_init(s)) < 0)
>              return err;
> +
>          oc = seg->avf;
> +
> +        av_dict_copy(&oc->metadata, tmp, 0);
>      }

i suspect theres a memleak

also why is the metadata not copied in segment_mux_init() ?
it seems to fit there better

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130316/bb362b07/attachment.asc>


More information about the ffmpeg-devel mailing list