media: vidtv: psi: fix missing crc for PMT
The PMT write function was refactored and this broke the CRC computation.
Fix it.
Fixes: db9569f67e
("media: vidtv: cleanup PMT write table function")
Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
5320f4c1fb
commit
0a933a7f73
|
@ -1164,6 +1164,8 @@ u32 vidtv_psi_pmt_write_into(struct vidtv_psi_pmt_write_args *args)
|
||||||
struct vidtv_psi_desc *table_descriptor = args->pmt->descriptor;
|
struct vidtv_psi_desc *table_descriptor = args->pmt->descriptor;
|
||||||
struct vidtv_psi_table_pmt_stream *stream = args->pmt->stream;
|
struct vidtv_psi_table_pmt_stream *stream = args->pmt->stream;
|
||||||
struct vidtv_psi_desc *stream_descriptor;
|
struct vidtv_psi_desc *stream_descriptor;
|
||||||
|
u32 crc = INITIAL_CRC;
|
||||||
|
u32 nbytes = 0;
|
||||||
struct header_write_args h_args = {
|
struct header_write_args h_args = {
|
||||||
.dest_buf = args->buf,
|
.dest_buf = args->buf,
|
||||||
.dest_offset = args->offset,
|
.dest_offset = args->offset,
|
||||||
|
@ -1181,6 +1183,7 @@ u32 vidtv_psi_pmt_write_into(struct vidtv_psi_pmt_write_args *args)
|
||||||
.new_psi_section = false,
|
.new_psi_section = false,
|
||||||
.is_crc = false,
|
.is_crc = false,
|
||||||
.dest_buf_sz = args->buf_sz,
|
.dest_buf_sz = args->buf_sz,
|
||||||
|
.crc = &crc,
|
||||||
};
|
};
|
||||||
struct desc_write_args d_args = {
|
struct desc_write_args d_args = {
|
||||||
.dest_buf = args->buf,
|
.dest_buf = args->buf,
|
||||||
|
@ -1193,8 +1196,6 @@ u32 vidtv_psi_pmt_write_into(struct vidtv_psi_pmt_write_args *args)
|
||||||
.pid = args->pid,
|
.pid = args->pid,
|
||||||
.dest_buf_sz = args->buf_sz,
|
.dest_buf_sz = args->buf_sz,
|
||||||
};
|
};
|
||||||
u32 crc = INITIAL_CRC;
|
|
||||||
u32 nbytes = 0;
|
|
||||||
|
|
||||||
vidtv_psi_pmt_table_update_sec_len(args->pmt);
|
vidtv_psi_pmt_table_update_sec_len(args->pmt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue