]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wnv1.c
x86: ff_get_cpu_flags_x86(): Avoid a pointless variable indirection
[ffmpeg] / libavcodec / wnv1.c
index 7c0a537082ff519f6ccac6bfc30d13dd98f636ea..5b0811d1962973a3aea987a2019c013a901a6890 100644 (file)
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     WNV1Context * const l = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&l->pic;
+    AVFrame * const p = &l->pic;
     unsigned char *Y,*U,*V;
     int i, j;
     int prev_y = 0, prev_u = 0, prev_v = 0;
@@ -96,11 +96,13 @@ static int decode_frame(AVCodecContext *avctx,
     else {
         l->shift = 8 - (buf[2] >> 4);
         if (l->shift > 4) {
-            av_log(avctx, AV_LOG_ERROR, "Unknown WNV1 frame header value %i, please upload file for study\n", buf[2] >> 4);
+            av_log_ask_for_sample(avctx, "Unknown WNV1 frame header value %i\n",
+                                  buf[2] >> 4);
             l->shift = 4;
         }
         if (l->shift < 1) {
-            av_log(avctx, AV_LOG_ERROR, "Unknown WNV1 frame header value %i, please upload file for study\n", buf[2] >> 4);
+            av_log_ask_for_sample(avctx, "Unknown WNV1 frame header value %i\n",
+                                  buf[2] >> 4);
             l->shift = 1;
         }
     }
@@ -155,14 +157,13 @@ static av_cold int decode_end(AVCodecContext *avctx){
 }
 
 AVCodec ff_wnv1_decoder = {
-    "wnv1",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_WNV1,
-    sizeof(WNV1Context),
-    decode_init,
-    NULL,
-    decode_end,
-    decode_frame,
-    CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
+    .name           = "wnv1",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = AV_CODEC_ID_WNV1,
+    .priv_data_size = sizeof(WNV1Context),
+    .init           = decode_init,
+    .close          = decode_end,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
+    .long_name      = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
 };