[FFmpeg-devel] [PATCH 2/2] avformat/rpl: Support files containing Replay IMA ADPCM audio

Michael Niedermayer michael at niedermayer.cc
Sat Jun 29 19:33:09 EEST 2019


On Thu, Jun 27, 2019 at 08:56:02PM +0100, Cameron Cawley wrote:
> ---
>  libavformat/rpl.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/rpl.c b/libavformat/rpl.c
> index dbbcd13b41..b4859320f4 100644
> --- a/libavformat/rpl.c
> +++ b/libavformat/rpl.c
> @@ -121,6 +121,7 @@ static int rpl_read_header(AVFormatContext *s)
>      int error = 0;
>      const char *endptr;
>      char audio_type[RPL_LINE_LENGTH];
> +    char audio_codec[RPL_LINE_LENGTH];
>  
>      uint32_t i;
>  
> @@ -189,7 +190,9 @@ static int rpl_read_header(AVFormatContext *s)
>  
>      // ARMovie supports multiple audio tracks; I don't have any
>      // samples, though. This code will ignore additional tracks.
> -    audio_format = read_line_and_int(pb, &error);  // audio format ID
> +    error |= read_line(pb, line, sizeof(line));
> +    audio_format = read_int(line, &endptr, &error);  // audio format ID

> +    strcpy(audio_codec, endptr);

This should be using a function checking the available space

[...]

thx

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20190629/6e4705cb/attachment.sig>


More information about the ffmpeg-devel mailing list