Message ID | 20200109105245.3950-1-lance.lmwang@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [FFmpeg-devel,v1] avcodec/libx265: Fix Uninitialized scalar variable | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
On 09/01/2020 10:52, lance.lmwang@gmail.com wrote: > + default: > + pict_type = AV_PICTURE_TYPE_NONE; Is this ever possible to actually hit in the API, though? Maybe more useful to return an error in such a case, since something is really wrong probably? - Derek
On Mon, Jan 13, 2020 at 04:19:10PM +0000, Derek Buitenhuis wrote: > On 09/01/2020 10:52, lance.lmwang@gmail.com wrote: > > + default: > > + pict_type = AV_PICTURE_TYPE_NONE; > > Is this ever possible to actually hit in the API, though? > > Maybe more useful to return an error in such a case, since something > is really wrong probably? It's OK to return an error from my side, I'm use the same way like libx264, if prefer to such way, it's better to change libx264 to return error also. > > - Derek > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 9e4711e50b..7f18db92e4 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -549,6 +549,8 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, case X265_TYPE_BREF: pict_type = AV_PICTURE_TYPE_B; break; + default: + pict_type = AV_PICTURE_TYPE_NONE; } #if FF_API_CODED_FRAME