[FFmpeg-devel] [PATCH 06/12] avformat/ffmenc: use ff_parse_creation_time_metadata

Michael Niedermayer michael at niedermayer.cc
Sun Feb 7 02:05:14 CET 2016


On Sat, Feb 06, 2016 at 08:13:17PM +0100, Marton Balint wrote:
> FYI this muxer bails out on parse error and not just warn the user.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/ffmenc.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
> index f0b5743..bbab1db 100644
> --- a/libavformat/ffmenc.c
> +++ b/libavformat/ffmenc.c
> @@ -221,17 +221,13 @@ static int ffm_write_recommended_config(AVIOContext *pb, AVCodecContext *ctx, un
>  static int ffm_write_header(AVFormatContext *s)
>  {
>      FFMContext *ffm = s->priv_data;
> -    AVDictionaryEntry *t;
>      AVStream *st;
>      AVIOContext *pb = s->pb;
>      AVCodecContext *codec;
>      int bit_rate, i, ret;
>  
> -    if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
> -        ret = av_parse_time(&ffm->start_time, t->value, 0);
> -        if (ret < 0)
> -            return ret;
> -    }

> +    if ((ret = ff_parse_creation_time_metadata(s, &ffm->start_time, 0) < 0))

the () is wrongly placed

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160207/38a382bb/attachment.sig>


More information about the ffmpeg-devel mailing list