* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
#include "avcodec.h"
int compression_type;
} TargaContext;
-static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp)
+static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp)
{
int i, x, y;
int depth = (bpp + 1) >> 3;
static int decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
TargaContext * const s = avctx->priv_data;
AVFrame *picture = data;
return buf_size;
}
-static int targa_init(AVCodecContext *avctx){
+static av_cold int targa_init(AVCodecContext *avctx){
TargaContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
return 0;
}
-static int targa_end(AVCodecContext *avctx){
+static av_cold int targa_end(AVCodecContext *avctx){
TargaContext *s = avctx->priv_data;
if(s->picture.data[0])
targa_end,
decode_frame,
0,
- NULL
+ NULL,
+ .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
};