[FFmpeg-devel] [PATCH v2 2/2] avcodec/libx264: return error if unknown picture type encountered
Michael Niedermayer
michael at niedermayer.cc
Sat Jan 18 16:27:12 EET 2020
On Sat, Jan 18, 2020 at 06:38:25AM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavcodec/libx264.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
> index ca8f6c0..4fef0be 100644
> --- a/libavcodec/libx264.c
> +++ b/libavcodec/libx264.c
> @@ -471,7 +471,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
> pict_type = AV_PICTURE_TYPE_B;
> break;
> default:
> - pict_type = AV_PICTURE_TYPE_NONE;
> + av_log(ctx, AV_LOG_ERROR, "Unknown picture type encountered.\n");
> + return AVERROR_EXTERNAL;
> }
This builds now but it does not work
./ffmpeg -i mm-short.mpg -t 1 test.mp4
[libx264 @ 0x2d2c1c0] Unknown picture type encountered.
Video encoding failed
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200118/2bad0346/attachment.sig>
More information about the ffmpeg-devel
mailing list