[FFmpeg-devel] [PATCH 4/4] movtextdec: Don't emit errors for normal duration-end packets.
Clément Bœsch
ubitux at gmail.com
Mon Aug 13 07:49:13 CEST 2012
On Sun, Aug 12, 2012 at 02:26:29PM -0700, Philip Langdale wrote:
> The logic here was off. If the packet size is exactly two, then
> it's a well-formed empty subtitle, used to mark the end of the
> duration of the previous subtitle.
>
> Signed-off-by: Philip Langdale <philipl at overt.org>
> ---
> libavcodec/movtextdec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
> index 52668e2..edaeac0 100644
> --- a/libavcodec/movtextdec.c
> +++ b/libavcodec/movtextdec.c
> @@ -66,7 +66,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
> const char *end;
>
> if (!ptr || avpkt->size <= 2)
> - return avpkt->size ? AVERROR_INVALIDDATA : 0;
> + return avpkt->size < 2 ? AVERROR_INVALIDDATA : 0;
>
OK if you add a note above about the size==2 case.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120813/6e8b06a7/attachment.asc>
More information about the ffmpeg-devel
mailing list