OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e30004f
)
Check that palctrl is available on init instead of crashing when trying to use
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sun, 5 Jul 2009 12:14:05 +0000
(12:14 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sun, 5 Jul 2009 12:14:05 +0000
(12:14 +0000)
it on decode.
Fixes mpeg2/smclockmpeg2.avi.2.1 from issue 1240.
Originally committed as revision 19347 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/qpeg.c
patch
|
blob
|
history
diff --git
a/libavcodec/qpeg.c
b/libavcodec/qpeg.c
index
20f1663
..
6b5d873
100644
(file)
--- a/
libavcodec/qpeg.c
+++ b/
libavcodec/qpeg.c
@@
-289,6
+289,10
@@
static int decode_frame(AVCodecContext *avctx,
static av_cold int decode_init(AVCodecContext *avctx){
QpegContext * const a = avctx->priv_data;
+ if (!avctx->palctrl) {
+ av_log(avctx, AV_LOG_FATAL, "Missing required palette via palctrl\n");
+ return -1;
+ }
a->avctx = avctx;
avctx->pix_fmt= PIX_FMT_PAL8;
a->refdata = av_malloc(avctx->width * avctx->height);