mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/rcwtenc: Pass RCWTContext directly in rcwt_init_cluster()
It does not use the AVFormatContext at all. Reviewed-by: Marth64 <marth64@proxyid.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
a8e55cf118
commit
3371250c32
@ -70,10 +70,8 @@ typedef struct RCWTContext {
|
||||
uint8_t cluster_buf[RCWT_CLUSTER_MAX_BLOCKS * RCWT_BLOCK_SIZE];
|
||||
} RCWTContext;
|
||||
|
||||
static void rcwt_init_cluster(AVFormatContext *avf)
|
||||
static void rcwt_init_cluster(RCWTContext *rcwt)
|
||||
{
|
||||
RCWTContext *rcwt = avf->priv_data;
|
||||
|
||||
rcwt->cluster_pos = 0;
|
||||
rcwt->cluster_pts = AV_NOPTS_VALUE;
|
||||
}
|
||||
@ -88,7 +86,7 @@ static void rcwt_flush_cluster(AVFormatContext *avf)
|
||||
avio_write(avf->pb, rcwt->cluster_buf, rcwt->cluster_pos);
|
||||
}
|
||||
|
||||
rcwt_init_cluster(avf);
|
||||
rcwt_init_cluster(rcwt);
|
||||
}
|
||||
|
||||
static int rcwt_write_header(AVFormatContext *avf)
|
||||
@ -117,7 +115,7 @@ static int rcwt_write_header(AVFormatContext *avf)
|
||||
avio_wb16(avf->pb, 0x000);
|
||||
avio_w8(avf->pb, 0x00);
|
||||
|
||||
rcwt_init_cluster(avf);
|
||||
rcwt_init_cluster(avf->priv_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user