~ubuntu-branches/ubuntu/saucy/gst-libav1.0/saucy-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/msrle.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    switch (avctx->bits_per_coded_sample) {
57
57
    case 4:
58
58
    case 8:
59
 
        avctx->pix_fmt = PIX_FMT_PAL8;
 
59
        avctx->pix_fmt = AV_PIX_FMT_PAL8;
60
60
        break;
61
61
    case 24:
62
 
        avctx->pix_fmt = PIX_FMT_BGR24;
 
62
        avctx->pix_fmt = AV_PIX_FMT_BGR24;
63
63
        break;
64
64
    default:
65
65
        av_log(avctx, AV_LOG_ERROR, "unsupported bits per sample\n");
72
72
}
73
73
 
74
74
static int msrle_decode_frame(AVCodecContext *avctx,
75
 
                              void *data, int *data_size,
 
75
                              void *data, int *got_frame,
76
76
                              AVPacket *avpkt)
77
77
{
78
78
    const uint8_t *buf = avpkt->data;
128
128
        ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, &s->gb);
129
129
    }
130
130
 
131
 
    *data_size = sizeof(AVFrame);
 
131
    *got_frame      = 1;
132
132
    *(AVFrame*)data = s->frame;
133
133
 
134
134
    /* report that the buffer was completely consumed */
149
149
AVCodec ff_msrle_decoder = {
150
150
    .name           = "msrle",
151
151
    .type           = AVMEDIA_TYPE_VIDEO,
152
 
    .id             = CODEC_ID_MSRLE,
 
152
    .id             = AV_CODEC_ID_MSRLE,
153
153
    .priv_data_size = sizeof(MsrleContext),
154
154
    .init           = msrle_decode_init,
155
155
    .close          = msrle_decode_end,
156
156
    .decode         = msrle_decode_frame,
157
157
    .capabilities   = CODEC_CAP_DR1,
158
 
    .long_name= NULL_IF_CONFIG_SMALL("Microsoft RLE"),
 
158
    .long_name      = NULL_IF_CONFIG_SMALL("Microsoft RLE"),
159
159
};