Hi, On Sat, Oct 3, 2015 at 5:59 PM, Marton Balint <c...@passwd.hu> wrote:
> Fixes Coverity CID 1323077. > > Signed-off-by: Marton Balint <c...@passwd.hu> > --- > libavformat/concatdec.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c > index 88b6dbe..832b7f4 100644 > --- a/libavformat/concatdec.c > +++ b/libavformat/concatdec.c > @@ -389,16 +389,16 @@ static int concat_read_header(AVFormatContext *avf) > file->outpoint = dur; > } else if (!strcmp(keyword, "file_packet_metadata")) { > char *metadata; > - metadata = av_get_token((const char **)&cursor, SPACE_CHARS); > - if (!metadata) { > - av_log(avf, AV_LOG_ERROR, "Line %d: packet metadata > required\n", line); > - FAIL(AVERROR_INVALIDDATA); > - } > if (!file) { > av_log(avf, AV_LOG_ERROR, "Line %d: %s without file\n", > line, keyword); > FAIL(AVERROR_INVALIDDATA); > } > + metadata = av_get_token((const char **)&cursor, SPACE_CHARS); > + if (!metadata) { > + av_log(avf, AV_LOG_ERROR, "Line %d: packet metadata > required\n", line); > + FAIL(AVERROR_INVALIDDATA); > + } > if ((ret = av_dict_parse_string(&file->metadata, metadata, > "=", "", 0)) < 0) { > av_log(avf, AV_LOG_ERROR, "Line %d: failed to parse > metadata string\n", line); > av_freep(&metadata); > -- > 2.1.4 OK. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel