This commit updates the documentation of av_read_frame() to match its actual behaviour in several ways: 1. On success, av_read_frame() always returns refcounted packets. 2. It can handle uninitialized packets. 3. On error, it always returns blank packets. This will allow callers to not initialize or unref unnecessarily.
Showing the changes to doc/APIchanges (1 of 2 files). Show all
Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | API changes, most recent first: | 16 | API changes, most recent first: |
| 17 | 17 | ||
| 18 | 2020-03-29 - xxxxxxxxxx - lavf 58.42.100 - avformat.h | ||
| 19 | av_read_frame() now guarantees to handle uninitialized input packets | ||
| 20 | and to return refcounted packets on success. | ||
| 21 | |||
| 18 | 2020-03-27 - xxxxxxxxxx - lavc 58.77.100 - avcodec.h | 22 | 2020-03-27 - xxxxxxxxxx - lavc 58.77.100 - avcodec.h |
| 19 | av_packet_ref() now guarantees to return the destination packet | 23 | av_packet_ref() now guarantees to return the destination packet |
| 20 | in a blank state on error. | 24 | in a blank state on error. |