[FFmpeg-devel] [PATCH 1/4] avformat/libopenmpt: Fix mixed code and declarations

Michael Niedermayer michael at niedermayer.cc
Sun Jan 7 03:27:52 EET 2018


On Sat, Jan 06, 2018 at 11:07:05AM +0100, Jörn Heusipp wrote:
> Signed-off-by: Jörn Heusipp <osmanx at problemloesungsmaschine.de>
> ---
>  libavformat/libopenmpt.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
> index af6eb1a..2e22290 100644
> --- a/libavformat/libopenmpt.c
> +++ b/libavformat/libopenmpt.c
> @@ -72,13 +72,14 @@ static int read_header_openmpt(AVFormatContext *s)
>  {
>      AVStream *st;
>      OpenMPTContext *openmpt = s->priv_data;
> -    int64_t size = avio_size(s->pb);
> -    if (size <= 0)
> -        return AVERROR_INVALIDDATA;
> -    char *buf = av_malloc(size);
> +    int64_t size;
> +    char *buf;
>      int ret;
>  
> -

> +    size = avio_size(s->pb);

you dont have to split this
but LGTM either way


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180107/a253774f/attachment.sig>


More information about the ffmpeg-devel mailing list