Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2013-01-07 15:08:39 +0400
committerPeter Ross <pross@xvid.org>2013-01-09 17:14:56 +0400
commit5b69c07d12b1e505fd7468828ed85d6d8d634621 (patch)
treefcd0c5f629644718be7d5ae3a62362e848fde5e8 /libavformat/frmdec.c
parent4765f635387cef3efb01e52e59d4f3add126a0e2 (diff)
frmdec: tag 5 is AV_PIX_FMT_BGRA with reversed alpha (0=solid/opaque .. 255=transparent)
Diffstat (limited to 'libavformat/frmdec.c')
-rw-r--r--libavformat/frmdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/frmdec.c b/libavformat/frmdec.c
index 914bab5cd4..9c29842734 100644
--- a/libavformat/frmdec.c
+++ b/libavformat/frmdec.c
@@ -33,7 +33,7 @@ static const AVCodecTag frm_pix_fmt_tags[] = {
{ AV_PIX_FMT_RGB0, 2 },
{ AV_PIX_FMT_RGB24, 3 },
{ AV_PIX_FMT_BGR0, 4 },
- { AV_PIX_FMT_BGR0, 5 },
+ { AV_PIX_FMT_BGRA, 5 },
{ AV_PIX_FMT_NONE, 0 },
};
@@ -88,6 +88,12 @@ static int frm_read_packet(AVFormatContext *avctx, AVPacket *pkt)
if (ret < 0)
return ret;
+ if (stc->pix_fmt == AV_PIX_FMT_BGRA) {
+ int i;
+ for (i = 3; i + 1 <= pkt->size; i += 4)
+ pkt->data[i] = 0xFF - pkt->data[i];
+ }
+
pkt->stream_index = 0;
s->count++;