~ubuntu-branches/debian/sid/ffmpeg/sid

« back to all changes in this revision

Viewing changes to libavcodec/targaenc.c

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Fabian Greffrath, Andreas Cadhalpun
  • Date: 2015-09-22 15:15:20 UTC
  • mfrom: (0.1.29)
  • Revision ID: package-import@ubuntu.com-20150922151520-hhmd3in9ykigjvs9
Tags: 7:2.8-1
[ Fabian Greffrath ]
* Pass the --dbg-package=ffmpeg-dbg parameter only to dh_strip.
* Add alternative Depends: libavcodec-ffmpeg-extra56 to libavcodec-dev and
  ffmpeg-dbg to allow for building and debugging with this library installed.

[ Andreas Cadhalpun ]
* Import new major upstream release 2.8.
* Remove the transitional lib*-ffmpeg-dev packages.
* Drop old Breaks on kodi-bin.
* Drop workaround for sparc, which is no Debian architecture anymore.
* Re-enable x265 on alpha, as it's available again.
* Disable unavailable frei0r, opencv and x264 on mips64el.
* Disable libopenjpeg (#787275) and libschroedinger (#787957) decoders.
  (Closes: #786670)
* Disable libdc1394 on sparc64, because it links against the broken due to
  #790560 libudev1.
* Enable libsnappy support.
* Add new symbols.
* Update debian/copyright.
* Update debian/tests/encdec_list.txt.
* Add hls-only-seek-if-there-is-an-offset.patch. (Closes: #798189)
* Add 'Breaks: libavutil-ffmpeg54 (>= 8:0)' to the libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
        return AVERROR(EINVAL);
86
86
    }
87
87
    picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
88
 
    if ((ret = ff_alloc_packet2(avctx, pkt, picsize + 45)) < 0)
 
88
    if ((ret = ff_alloc_packet2(avctx, pkt, picsize + 45, 0)) < 0)
89
89
        return ret;
90
90
 
91
91
    /* zero out the header and only set applicable fields */
172
172
 
173
173
static av_cold int targa_encode_init(AVCodecContext *avctx)
174
174
{
175
 
    avctx->coded_frame = av_frame_alloc();
176
 
    if (!avctx->coded_frame)
177
 
        return AVERROR(ENOMEM);
178
 
 
 
175
#if FF_API_CODED_FRAME
 
176
FF_DISABLE_DEPRECATION_WARNINGS
179
177
    avctx->coded_frame->key_frame = 1;
180
178
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
181
 
 
182
 
    return 0;
183
 
}
184
 
 
185
 
static av_cold int targa_encode_close(AVCodecContext *avctx)
186
 
{
187
 
    av_frame_free(&avctx->coded_frame);
 
179
FF_ENABLE_DEPRECATION_WARNINGS
 
180
#endif
 
181
 
188
182
    return 0;
189
183
}
190
184
 
194
188
    .type           = AVMEDIA_TYPE_VIDEO,
195
189
    .id             = AV_CODEC_ID_TARGA,
196
190
    .init           = targa_encode_init,
197
 
    .close          = targa_encode_close,
198
191
    .encode2        = targa_encode_frame,
199
192
    .pix_fmts       = (const enum AVPixelFormat[]){
200
193
        AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,