Skip to content
Snippets Groups Projects
Commit c52ec036 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt
Browse files

avcodec/avcodec, avpacket: Return blank packet on av_packet_ref() failure


Up until now, it was completely unspecified what the content of the
destination packet dst was on error. Depending upon where the error
happened calling av_packet_unref() on dst might be dangerous.

This commit changes this by making sure that dst is blank on error, so
unreferencing it again is safe (and still pointless). This behaviour is
documented.

Signed-off-by: default avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent e621f2b6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment