History

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.

Andreas Rheinhardt committed 6 years ago

Commit c52ec031 parent e621f2b4 files · +11 −5Browse files

Showing the changes to doc/APIchanges (1 of 4 files). Show all

Unified · Split

doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2020-03-27 - xxxxxxxxxx - lavc 58.77.100 - avcodec.h
19+ av_packet_ref() now guarantees to return the destination packet
20+ in a blank state on error.
21+
1822 2020-03-10 - xxxxxxxxxx - lavc 58.75.100 - avcodec.h
1923 Add AV_PKT_DATA_ICC_PROFILE.
2024

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t