[FFmpeg-devel] [PATCH] Allow mpjpeg headers parsing to succeed upon EOF, if required headers are present
Michael Niedermayer
michaelni at gmx.at
Sun Sep 13 01:08:02 CEST 2015
On Sat, Sep 12, 2015 at 06:49:41PM -0400, Alex Agranovsky wrote:
> Modified patch is attached.
>
> --
> Alex Agranovsky
> Sighthound, Inc
> www.sighthound.com
>
> On September 12, 2015 at 5:37:51 PM, Michael Niedermayer (michaelni at gmx.at) wrote:
>
> On Sat, Sep 12, 2015 at 04:33:17PM -0400, Alex Agranovsky wrote:
> > libavformat/mpjpegdec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
> > index b8281fc..8413ae7 100644
> > --- a/libavformat/mpjpegdec.c
> > +++ b/libavformat/mpjpegdec.c
> > @@ -165,7 +165,7 @@ static int parse_multipart_header(AVFormatContext *s)
> >
> > ret = get_line(s->pb, line, sizeof(line));
> > if (ret < 0)
> > - return ret;
> > + break;
>
> Applying: Allow mpjpeg headers parsing to succeed upon EOF, if required headers are present
> fatal: corrupt patch at line 7
>
> also for strict correctness this should probably only break for AVERROR_EOF
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Dictatorship naturally arises out of democracy, and the most aggravated
> form of tyranny and slavery out of the most extreme liberty. -- Plato
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> mpjpegdec.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 95570908ce1b8c6a97e45954d4f5a801a525d22c patch1.diff
> diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
> index b8281fc..e4d76f3 100644
> --- a/libavformat/mpjpegdec.c
> +++ b/libavformat/mpjpegdec.c
> @@ -154,8 +154,11 @@ static int parse_multipart_header(AVFormatContext *s)
> int ret, size = -1;
>
> ret = get_line(s->pb, line, sizeof(line));
> - if (ret < 0)
> + if (ret < 0) {
> + if (ret==AVERROR_EOF)
> + break;
> return ret;
> + }
this is a different hunk and it fails to build:
ffmpeg/libavformat/mpjpegdec.c: In function ‘parse_multipart_header’:
ffmpeg/libavformat/mpjpegdec.c:159:13: error: break statement not within loop or switch
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150913/8216fb90/attachment.sig>
More information about the ffmpeg-devel
mailing list