]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/targa.c
Rewrite doxy for av_strtod().
[ffmpeg] / libavcodec / targa.c
index 9c7bad8491e0b2a39dd3f12cfd0998d6aa562d82..ba541619bf8c7bc843e4469f706f6a8580ade329 100644 (file)
@@ -18,6 +18,8 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavutil/intreadwrite.h"
 #include "avcodec.h"
 
 enum TargaCompr{
@@ -89,8 +91,10 @@ static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8
 
 static int decode_frame(AVCodecContext *avctx,
                         void *data, int *data_size,
-                        const uint8_t *buf, int buf_size)
+                        AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     TargaContext * const s = avctx->priv_data;
     AVFrame *picture = data;
     AVFrame * const p= (AVFrame*)&s->picture;
@@ -225,7 +229,6 @@ static av_cold int targa_init(AVCodecContext *avctx){
 
     avcodec_get_frame_defaults((AVFrame*)&s->picture);
     avctx->coded_frame= (AVFrame*)&s->picture;
-    s->picture.data[0] = NULL;
 
     return 0;
 }
@@ -248,7 +251,7 @@ AVCodec targa_decoder = {
     NULL,
     targa_end,
     decode_frame,
-    0,
+    CODEC_CAP_DR1,
     NULL,
-    .long_name = "Truevision Targa image",
+    .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
 };