diff mbox series

[FFmpeg-devel] avformat/udp: remove redundant setting of h->max_packet_size

Message ID tencent_164EC9703D2D569ADF40719A4D9F51ABAC08@qq.com
State Accepted
Commit 15a74d21f3d7e8e6eca475903ef6252343861483
Headers show
Series [FFmpeg-devel] avformat/udp: remove redundant setting of h->max_packet_size | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Zhao Zhili Sept. 23, 2020, 4:15 p.m. UTC
h->max_packet_size is being reset in the following code.
---
 libavformat/udp.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jun Zhao Sept. 24, 2020, 2:31 a.m. UTC | #1
On Thu, Sep 24, 2020 at 12:15 AM Zhao Zhili <quinkblack@foxmail.com> wrote:
>
> h->max_packet_size is being reset in the following code.
> ---
>  libavformat/udp.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/libavformat/udp.c b/libavformat/udp.c
> index 30d8041433..96d8b8ee11 100644
> --- a/libavformat/udp.c
> +++ b/libavformat/udp.c
> @@ -650,9 +650,6 @@ static int udp_open(URLContext *h, const char *uri, int flags)
>              goto fail;
>      }
>
> -    if (s->pkt_size > 0)
> -        h->max_packet_size = s->pkt_size;
> -
>      p = strchr(uri, '?');
>      if (p) {
>          if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
> --
LGTM
Zhao Zhili Oct. 11, 2020, 4:52 p.m. UTC | #2
Ping.


On Thu, Sep 24, 2020 at 12:15 AM Zhao Zhili <quinkblack@foxmail.com&gt; wrote:
&gt;
&gt; h-&gt;max_packet_size is being reset in the following code.
&gt; ---
&gt;&nbsp; libavformat/udp.c | 3 ---
&gt;&nbsp; 1 file changed, 3 deletions(-)
&gt;
&gt; diff --git a/libavformat/udp.c b/libavformat/udp.c
&gt; index 30d8041433..96d8b8ee11 100644
&gt; --- a/libavformat/udp.c
&gt; +++ b/libavformat/udp.c
&gt; @@ -650,9 +650,6 @@ static int udp_open(URLContext *h, const char *uri, int flags)
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto fail;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
&gt;
&gt; -&nbsp;&nbsp;&nbsp; if (s-&gt;pkt_size &gt; 0)
&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h-&gt;max_packet_size = s-&gt;pkt_size;
&gt; -
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = strchr(uri, '?');
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (p) {
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
&gt; --
LGTM
Marton Balint Oct. 16, 2020, 9:11 p.m. UTC | #3
On Thu, 24 Sep 2020, mypopy@gmail.com wrote:

> On Thu, Sep 24, 2020 at 12:15 AM Zhao Zhili <quinkblack@foxmail.com> wrote:
>>
>> h->max_packet_size is being reset in the following code.
>> ---
>>  libavformat/udp.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/libavformat/udp.c b/libavformat/udp.c
>> index 30d8041433..96d8b8ee11 100644
>> --- a/libavformat/udp.c
>> +++ b/libavformat/udp.c
>> @@ -650,9 +650,6 @@ static int udp_open(URLContext *h, const char *uri, int flags)
>>              goto fail;
>>      }
>>
>> -    if (s->pkt_size > 0)
>> -        h->max_packet_size = s->pkt_size;
>> -
>>      p = strchr(uri, '?');
>>      if (p) {
>>          if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
>> --
> LGTM

Will apply, thanks.

Marton
diff mbox series

Patch

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 30d8041433..96d8b8ee11 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -650,9 +650,6 @@  static int udp_open(URLContext *h, const char *uri, int flags)
             goto fail;
     }
 
-    if (s->pkt_size > 0)
-        h->max_packet_size = s->pkt_size;
-
     p = strchr(uri, '?');
     if (p) {
         if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {