History

avcodec/bsf: mention that av_bsf_send_packet() returning EAGAIN is not an error

EAGAIN is returned when input is provided but can't be consumed. The filtering process is unaffected in this case, and the function will be able to consume new input after retrieving filtered packets with av_bsf_receive_packet(). Remove the line about empty packets never failing added in 41b05b849f215b03eeb9e3608571ba47de64182a while at it. Even if it's currently the case, it unnecessarily constrains the API and could be changed in the future in case it needs to be extended. The user should always check for errors and never expect a call to never fail.

James Almer committed 6 years ago

Commit 1e8ed181 parent bdd6aa21 file · +3 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/bsf.h+3−2
@@ -182,8 +182,9 @@ int av_bsf_init(AVBSFContext *ctx); · 181 unmodified lines
182 * sending more empty packets does nothing) and will cause the filter to output182 * sending more empty packets does nothing) and will cause the filter to output
183 * any packets it may have buffered internally.183 * any packets it may have buffered internally.
184 *184 *
185 * @return 0 on success, a negative AVERROR on error. This function never fails if185 * @return 0 on success. AVERROR(EAGAIN) if packets need to be retrieved from the
186 * pkt is empty.186 * filter (using av_bsf_receive_packet()) before new input can be consumed. Another
187 * negative AVERROR value if an error occurs.
187 */188 */
188int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);189int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
189 190

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