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.
Showing the changes to doc/APIchanges (1 of 4 files). Show all
Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 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 | + | |
| 18 | 22 | 2020-03-10 - xxxxxxxxxx - lavc 58.75.100 - avcodec.h |
| 19 | 23 | Add AV_PKT_DATA_ICC_PROFILE. |
| 20 | 24 | |