diff mbox

[FFmpeg-devel] avformat/avio: fix avio_feof documentation

Message ID 20181208231836.22214-1-cus@passwd.hu
State Accepted
Commit dfd656632e8980574dcae5c13a22c0872bc0ac75
Headers show

Commit Message

Marton Balint Dec. 8, 2018, 11:18 p.m. UTC
It has been this way too long to change behaviour, so let's change the docs
instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/avio.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Marton Balint Dec. 14, 2018, 11:08 p.m. UTC | #1
On Sun, 9 Dec 2018, Marton Balint wrote:

> It has been this way too long to change behaviour, so let's change the docs
> instead.
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
> libavformat/avio.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index 75912ce6be..dcb8dcdf93 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -236,7 +236,7 @@ typedef struct AVIOContext {
>     int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
>     int64_t (*seek)(void *opaque, int64_t offset, int whence);
>     int64_t pos;            /**< position in the file of the current buffer */
> -    int eof_reached;        /**< true if eof reached */
> +    int eof_reached;        /**< true if was unable to read due to error or eof */
>     int write_flag;         /**< true if open for writing */
>     int max_packet_size;
>     unsigned long checksum;
> @@ -566,8 +566,8 @@ static av_always_inline int64_t avio_tell(AVIOContext *s)
> int64_t avio_size(AVIOContext *s);
> 
> /**
> - * feof() equivalent for AVIOContext.
> - * @return non zero if and only if end of file
> + * Similar to feof() but also returns nonzero on read errors.
> + * @return non zero if and only if at end of file or a read error happened when reading.
>  */
> int avio_feof(AVIOContext *s);

Will apply soon.

Thanks,
Marton
Marton Balint Dec. 22, 2018, 6:06 p.m. UTC | #2
On Sat, 15 Dec 2018, Marton Balint wrote:

>
>
> On Sun, 9 Dec 2018, Marton Balint wrote:
>
>> It has been this way too long to change behaviour, so let's change the docs
>> instead.
>>
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>> libavformat/avio.h | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavformat/avio.h b/libavformat/avio.h
>> index 75912ce6be..dcb8dcdf93 100644
>> --- a/libavformat/avio.h
>> +++ b/libavformat/avio.h
>> @@ -236,7 +236,7 @@ typedef struct AVIOContext {
>>     int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
>>     int64_t (*seek)(void *opaque, int64_t offset, int whence);
>>     int64_t pos;            /**< position in the file of the current buffer 
> */
>> -    int eof_reached;        /**< true if eof reached */
>> +    int eof_reached;        /**< true if was unable to read due to error 
> or eof */
>>     int write_flag;         /**< true if open for writing */
>>     int max_packet_size;
>>     unsigned long checksum;
>> @@ -566,8 +566,8 @@ static av_always_inline int64_t avio_tell(AVIOContext 
> *s)
>> int64_t avio_size(AVIOContext *s);
>> 
>> /**
>> - * feof() equivalent for AVIOContext.
>> - * @return non zero if and only if end of file
>> + * Similar to feof() but also returns nonzero on read errors.
>> + * @return non zero if and only if at end of file or a read error happened 
> when reading.
>>  */
>> int avio_feof(AVIOContext *s);
>
> Will apply soon.

Applied.

Regards,
Marton
diff mbox

Patch

diff --git a/libavformat/avio.h b/libavformat/avio.h
index 75912ce6be..dcb8dcdf93 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -236,7 +236,7 @@  typedef struct AVIOContext {
     int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
     int64_t (*seek)(void *opaque, int64_t offset, int whence);
     int64_t pos;            /**< position in the file of the current buffer */
-    int eof_reached;        /**< true if eof reached */
+    int eof_reached;        /**< true if was unable to read due to error or eof */
     int write_flag;         /**< true if open for writing */
     int max_packet_size;
     unsigned long checksum;
@@ -566,8 +566,8 @@  static av_always_inline int64_t avio_tell(AVIOContext *s)
 int64_t avio_size(AVIOContext *s);
 
 /**
- * feof() equivalent for AVIOContext.
- * @return non zero if and only if end of file
+ * Similar to feof() but also returns nonzero on read errors.
+ * @return non zero if and only if at end of file or a read error happened when reading.
  */
 int avio_feof(AVIOContext *s);