Skip to content

upipe_vanc_decoder: an improvement and minor fixes - #1265

Open
JDarnley wants to merge 3 commits into
Upipe:masterfrom
JDarnley:vancd
Open

JDarnley wants to merge 3 commits into
Upipe:masterfrom
JDarnley:vancd

Conversation

@JDarnley

Copy link
Copy Markdown
Contributor

I needed the PID in the output flow_def so I asked Claude about about the pipe and if its set_flow_def function was the usual way a pipe should change a flow from block to pic. It said no uref_sibling_alloc was to blame and said it should just be uref_dup and clear the old format.

Secondly it pointed out a pair of bugs in the case of errors so I took those fixes too.

The output flow_def was built with uref_sibling_alloc(), which returns
an empty uref, so every attribute of the input flow_def was dropped.
Instead duplicate the input flow_def like other pipes that change the
flow type do.
The UBASE_RETURN()s following the output flow_def allocation returned
without freeing it. Free it on failure. Also check the result of
uref_flow_set_def().
When uref_pic_plane_write() failed, the picture was freed but the loop
went on: it wrote through an uninitialized pointer, then used (or freed
again) the freed uref.

Log an error and drop the rest of the input packet instead, as the
other failure paths in the loop do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant