diff options
author | Tuomas Virtanen <katajakasa@gmail.com> | 2018-06-23 17:53:11 +0300 |
---|---|---|
committer | Tuomas Virtanen <katajakasa@gmail.com> | 2018-06-23 17:53:11 +0300 |
commit | 60dd75397f1ce9c4a56e74ee0bb94cebd4ab831c (patch) | |
tree | 03b39dc8f6f1b2167971dd6b3a7fa89a3ee29bda /src/internal/video/kitvideo.c | |
parent | 329de67ea44552c1d08e23203daee7e878ffd759 (diff) |
Implement new API for subtitle screen size and stream indexes
Diffstat (limited to 'src/internal/video/kitvideo.c')
-rw-r--r-- | src/internal/video/kitvideo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/internal/video/kitvideo.c b/src/internal/video/kitvideo.c index 5254d9e..e41614b 100644 --- a/src/internal/video/kitvideo.c +++ b/src/internal/video/kitvideo.c @@ -132,16 +132,17 @@ static void dec_close_video_cb(Kit_Decoder *dec) { free(video_dec);
}
-Kit_Decoder* Kit_CreateVideoDecoder(const Kit_Source *src, Kit_VideoFormat *format) {
+Kit_Decoder* Kit_CreateVideoDecoder(const Kit_Source *src, int stream_index, Kit_VideoFormat *format) {
assert(src != NULL);
assert(format != NULL);
- if(src->video_stream_index < 0) {
+ if(stream_index < 0) {
return NULL;
}
// First the generic decoder component ...
Kit_Decoder *dec = Kit_CreateDecoder(
- src, src->video_stream_index,
+ src,
+ stream_index,
KIT_VIDEO_OUT_SIZE,
free_out_video_packet_cb);
if(dec == NULL) {
@@ -152,7 +153,7 @@ Kit_Decoder* Kit_CreateVideoDecoder(const Kit_Source *src, Kit_VideoFormat *form format->is_enabled = true;
format->width = dec->codec_ctx->width;
format->height = dec->codec_ctx->height;
- format->stream_index = src->video_stream_index;
+ format->stream_index = stream_index;
format->format = _FindPixelFormat(dec->codec_ctx->pix_fmt);
// ... then allocate the video decoder
|