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:
786b096
)
avcodec/012v: improve stride selection
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 13 Jul 2013 14:18:06 +0000
(16:18 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 13 Jul 2013 14:23:31 +0000
(16:23 +0200)
Fixes decoding some files
Fixes Ticket2126
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/012v.c
patch
|
blob
|
history
diff --git
a/libavcodec/012v.c
b/libavcodec/012v.c
index
58e3cd6
..
f694769
100644
(file)
--- a/
libavcodec/012v.c
+++ b/
libavcodec/012v.c
@@
-49,6
+49,12
@@
static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "Width 1 not supported.\n");
return AVERROR_INVALIDDATA;
}
+
+ if ( avctx->codec_tag == MKTAG('0', '1', '2', 'v')
+ && avpkt->size % avctx->height == 0
+ && avpkt->size / avctx->height * 3 >= width * 8)
+ stride = avpkt->size / avctx->height;
+
if (avpkt->size < avctx->height * stride) {
av_log(avctx, AV_LOG_ERROR, "Packet too small: %d instead of %d\n",
avpkt->size, avctx->height * stride);