diff mbox series

[FFmpeg-devel] avformat/http: include version.h

Message ID 20220625020323.16181-1-jamrial@gmail.com
State Accepted
Commit c7ce03d826e9c7914876333f4ca1445394bd22fd
Headers show
Series [FFmpeg-devel] avformat/http: include version.h | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

James Almer June 25, 2022, 2:03 a.m. UTC
This is needed to get LIBAVFORMAT_VERSION, used as part of the user agent.
Fixes a recent regression.

Signed-off-by: James Almer <jamrial@gmail.com>
---
I dislike the fact AV_STRINGIFY() silenced the warning that should have been
printed about LIBAVFORMAT_VERSION being undefined.

Before:
./ffmpeg -h protocol=http
-user_agent        <string>     .D......... override User-Agent header (default "Lavf/LIBAVFORMAT_VERSION")

After:
./ffmpeg -h protocol=http
-user_agent        <string>     .D......... override User-Agent header (default "Lavf/59.25.100")

I suppose this is a regression since the recent work to split the library
version defines into separate headers.

 libavformat/http.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Rheinhardt June 25, 2022, 2:06 a.m. UTC | #1
James Almer:
> This is needed to get LIBAVFORMAT_VERSION, used as part of the user agent.
> Fixes a recent regression.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> I dislike the fact AV_STRINGIFY() silenced the warning that should have been
> printed about LIBAVFORMAT_VERSION being undefined.
> 
> Before:
> ./ffmpeg -h protocol=http
> -user_agent        <string>     .D......... override User-Agent header (default "Lavf/LIBAVFORMAT_VERSION")
> 
> After:
> ./ffmpeg -h protocol=http
> -user_agent        <string>     .D......... override User-Agent header (default "Lavf/59.25.100")
> 
> I suppose this is a regression since the recent work to split the library
> version defines into separate headers.
> 
>  libavformat/http.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/http.c b/libavformat/http.c
> index f80ea7bf35..c5c48c7900 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -41,6 +41,7 @@
>  #include "network.h"
>  #include "os_support.h"
>  #include "url.h"
> +#include "version.h"
>  
>  /* XXX: POST protocol is not completely implemented because ffmpeg uses
>   * only a subset of it. */

LGTM.

- Andreas
James Almer June 25, 2022, 2:08 a.m. UTC | #2
On 6/24/2022 11:06 PM, Andreas Rheinhardt wrote:
> James Almer:
>> This is needed to get LIBAVFORMAT_VERSION, used as part of the user agent.
>> Fixes a recent regression.
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> I dislike the fact AV_STRINGIFY() silenced the warning that should have been
>> printed about LIBAVFORMAT_VERSION being undefined.
>>
>> Before:
>> ./ffmpeg -h protocol=http
>> -user_agent        <string>     .D......... override User-Agent header (default "Lavf/LIBAVFORMAT_VERSION")
>>
>> After:
>> ./ffmpeg -h protocol=http
>> -user_agent        <string>     .D......... override User-Agent header (default "Lavf/59.25.100")
>>
>> I suppose this is a regression since the recent work to split the library
>> version defines into separate headers.
>>
>>   libavformat/http.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/libavformat/http.c b/libavformat/http.c
>> index f80ea7bf35..c5c48c7900 100644
>> --- a/libavformat/http.c
>> +++ b/libavformat/http.c
>> @@ -41,6 +41,7 @@
>>   #include "network.h"
>>   #include "os_support.h"
>>   #include "url.h"
>> +#include "version.h"
>>   
>>   /* XXX: POST protocol is not completely implemented because ffmpeg uses
>>    * only a subset of it. */
> 
> LGTM.
> 
> - Andreas

Applied, thanks.
diff mbox series

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index f80ea7bf35..c5c48c7900 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -41,6 +41,7 @@ 
 #include "network.h"
 #include "os_support.h"
 #include "url.h"
+#include "version.h"
 
 /* XXX: POST protocol is not completely implemented because ffmpeg uses
  * only a subset of it. */