]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xsubdec.c
lavf: move AVStream.pts_buffer to AVStreamInternal
[ffmpeg] / libavcodec / xsubdec.c
index 93fd0f4d50e542737f526419139c23f5f87b6adc..c1c6e11dc31807f3fb447baed7c526ae674e1e04 100644 (file)
@@ -46,7 +46,7 @@ static int64_t parse_timecode(const uint8_t *buf, int64_t packet_time) {
     return ms - packet_time;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,
                         AVPacket *avpkt) {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -130,7 +130,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
             ((uint32_t *)sub->rects[0]->data[1])[i] |= 0xff000000;
     } else {
         for (i = 0; i < sub->rects[0]->nb_colors; i++)
-            ((uint32_t *)sub->rects[0]->data[1])[i] |= *buf++ << 24;
+            ((uint32_t *)sub->rects[0]->data[1])[i] |= (unsigned)*buf++ << 24;
     }
 
 #if FF_API_AVPICTURE
@@ -169,7 +169,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
         bitmap += w;
         align_get_bits(&gb);
     }
-    *data_size = 1;
+    *got_sub_ptr = 1;
     return buf_size;
 }