diff mbox

[FFmpeg-devel] avcodec/qsvenc_h264: fix segfault when a53 SEI is not available

Message ID 1475674465-10776-1-git-send-email-sdk@nablet.com
State Accepted
Commit 8d858674fd1b114958c909065734b5df381ef356
Headers show

Commit Message

Nablet Developer Oct. 5, 2016, 1:34 p.m. UTC
Signed-off-by: Nablet Developer <sdk@nablet.com>
---
 libavcodec/qsvenc_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Oct. 5, 2016, 9:35 p.m. UTC | #1
On Wed, Oct 05, 2016 at 09:34:25AM -0400, Nablet Developer wrote:
> Signed-off-by: Nablet Developer <sdk@nablet.com>
> ---
>  libavcodec/qsvenc_h264.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thx

[...]
Michael Niedermayer Oct. 5, 2016, 9:43 p.m. UTC | #2
On Wed, Oct 05, 2016 at 11:35:08PM +0200, Michael Niedermayer wrote:
> On Wed, Oct 05, 2016 at 09:34:25AM -0400, Nablet Developer wrote:
> > Signed-off-by: Nablet Developer <sdk@nablet.com>
> > ---
> >  libavcodec/qsvenc_h264.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> applied

actually, before applying, one question

you have set the author for your git to "Nablet Developer"
is this intended? Do you not want your name to be in the Author field ?
If you dont mind your name to be in the author field then please
resubmit the patch with correct Author

[...]

thx
Nablet Developer Oct. 6, 2016, 8:08 a.m. UTC | #3
> 
> you have set the author for your git to "Nablet Developer"
> is this intended? Do you not want your name to be in the Author field ?
> If you dont mind your name to be in the author field then please
> resubmit the patch with correct Author
> 

yes, it's intentional, please apply as is with git Author field set to "Nablet Developer". thx.
Michael Niedermayer Oct. 6, 2016, 11:59 a.m. UTC | #4
On Thu, Oct 06, 2016 at 03:08:18PM +0700, nablet developer wrote:
> 
> > 
> > you have set the author for your git to "Nablet Developer"
> > is this intended? Do you not want your name to be in the Author field ?
> > If you dont mind your name to be in the author field then please
> > resubmit the patch with correct Author
> > 
> 
> yes, it's intentional, please apply as is with git Author field set to "Nablet Developer". thx.

ok, applied

thanks

[...]
diff mbox

Patch

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index c1f6003..f5b01bb 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -53,7 +53,7 @@  static int qsv_h264_set_encode_ctrl(AVCodecContext *avctx,
         int res;
 
         res = ff_alloc_a53_sei(frame, sizeof(mfxPayload) + 2, (void**)&payload, &sei_size);
-        if (res < 0)
+        if (res < 0 || !payload)
             return res;
 
         sei_data = (mfxU8*)(payload + 1);