diff mbox series

[FFmpeg-devel,09/10] avformat/nutenc: Write size into right dynamic buffer

Message ID 20200504182250.26141-9-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/10] libavformat/nutenc: Remove redundant function parameter | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 4, 2020, 6:22 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/nutenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer May 5, 2020, 1:22 p.m. UTC | #1
On Mon, May 04, 2020 at 08:22:49PM +0200, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/nutenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
> index 5735055d19..6df7dfe210 100644
> --- a/libavformat/nutenc.c
> +++ b/libavformat/nutenc.c
> @@ -902,7 +902,7 @@ static int write_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int
>                      put_str(dyn_bc, "ChannelLayout");
>                      put_s(dyn_bc, -2);
>                      put_str(dyn_bc, "u64");
> -                    put_v(bc, 8);
> +                    put_v(dyn_bc, 8);
>                      avio_write(dyn_bc, data, 8); data+=8;
>                      sm_data_count++;
>                  }

muxer/encoder fixes should bump LIBAVFORMAT_VERSION_MICRO so the
issue can be dectected unambigously on the demuxer side

thx

[...]
Andreas Rheinhardt May 5, 2020, 1:31 p.m. UTC | #2
Michael Niedermayer:
> On Mon, May 04, 2020 at 08:22:49PM +0200, Andreas Rheinhardt wrote:
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
>> ---
>>  libavformat/nutenc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
>> index 5735055d19..6df7dfe210 100644
>> --- a/libavformat/nutenc.c
>> +++ b/libavformat/nutenc.c
>> @@ -902,7 +902,7 @@ static int write_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int
>>                      put_str(dyn_bc, "ChannelLayout");
>>                      put_s(dyn_bc, -2);
>>                      put_str(dyn_bc, "u64");
>> -                    put_v(bc, 8);
>> +                    put_v(dyn_bc, 8);
>>                      avio_write(dyn_bc, data, 8); data+=8;
>>                      sm_data_count++;
>>                  }
> 
> muxer/encoder fixes should bump LIBAVFORMAT_VERSION_MICRO so the
> issue can be dectected unambigously on the demuxer side
> 
> thx
> 
> [...]

Added locally. Is the patch then ready to merge (it can be applied
independently of the rest) or not?

- Andreas
Michael Niedermayer May 5, 2020, 1:36 p.m. UTC | #3
On Tue, May 05, 2020 at 03:31:27PM +0200, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > On Mon, May 04, 2020 at 08:22:49PM +0200, Andreas Rheinhardt wrote:
> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> >> ---
> >>  libavformat/nutenc.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
> >> index 5735055d19..6df7dfe210 100644
> >> --- a/libavformat/nutenc.c
> >> +++ b/libavformat/nutenc.c
> >> @@ -902,7 +902,7 @@ static int write_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int
> >>                      put_str(dyn_bc, "ChannelLayout");
> >>                      put_s(dyn_bc, -2);
> >>                      put_str(dyn_bc, "u64");
> >> -                    put_v(bc, 8);
> >> +                    put_v(dyn_bc, 8);
> >>                      avio_write(dyn_bc, data, 8); data+=8;
> >>                      sm_data_count++;
> >>                  }
> > 
> > muxer/encoder fixes should bump LIBAVFORMAT_VERSION_MICRO so the
> > issue can be dectected unambigously on the demuxer side
> > 
> > thx
> > 
> > [...]
> 
> Added locally. Is the patch then ready to merge (it can be applied
> independently of the rest) or not?

probably ok

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 5735055d19..6df7dfe210 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -902,7 +902,7 @@  static int write_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int
                     put_str(dyn_bc, "ChannelLayout");
                     put_s(dyn_bc, -2);
                     put_str(dyn_bc, "u64");
-                    put_v(bc, 8);
+                    put_v(dyn_bc, 8);
                     avio_write(dyn_bc, data, 8); data+=8;
                     sm_data_count++;
                 }