[FFmpeg-devel] [PATCH]Improve pix_fmt detection for the native jpeg2000 decoder
Michael Niedermayer
michaelni at gmx.at
Sat Jul 13 00:35:47 CEST 2013
On Sat, Jul 06, 2013 at 03:34:50PM +0200, Carl-Eugen Hoyos wrote:
> Hi!
>
> Attached patch fixes ticket #2683 for me to some degree (-vcodec
> libopenjpeg was implicitely used before, it has to be passed
> explicitely now), heavily based on a patch by Michael Bradshaw.
>
> Now with attachment.
>
> Please review, Carl Eugen
> jpeg2000dec.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 122 insertions(+), 25 deletions(-)
> c561e9597e56b6d4d57e38b871c0c5aeffa05ad8 patchjpeg2000.diff
ffplay j2kreffile/file9.jp2
segfaults
and you need something like this to keep file8.jp2 working
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index aa70de5..46a6a497 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1486,6 +1486,8 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
atom2_size -= 3;
}
bytestream2_skipu(&s->g, atom2_size);
+ } else if (atom2 == JP2_CODESTREAM) {
+ return 1;
} else if (atom2_size <= atom_size &&
bytestream2_get_bytes_left(&s->g) >= atom2_size) {
bytestream2_skipu(&s->g, atom2_size);
[...]
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130713/a17a2065/attachment.asc>
More information about the ffmpeg-devel
mailing list