diff mbox series

[FFmpeg-devel,v4,1/2] Revert "avformat/dashdec: refine adaptionset attribute members"

Message ID 20200328132504.98885-1-lq@chinaffmpeg.org
State New
Headers show
Series [FFmpeg-devel,v4,1/2] Revert "avformat/dashdec: refine adaptionset attribute members"
Related show

Commit Message

Steven Liu March 28, 2020, 1:25 p.m. UTC
This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/dashdec.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

Comments

Andreas Rheinhardt March 28, 2020, 11:48 p.m. UTC | #1
Steven Liu:
> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
> 
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
>  libavformat/dashdec.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 5bbe5d3985..271202b0a5 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -122,19 +122,6 @@ struct representation {
>  typedef struct DASHContext {
>      const AVClass *class;
>      char *base_url;
> -    char *adaptionset_contenttype_val;
> -    char *adaptionset_par_val;
> -    char *adaptionset_lang_val;
> -    char *adaptionset_minbw_val;
> -    char *adaptionset_maxbw_val;
> -    char *adaptionset_minwidth_val;
> -    char *adaptionset_maxwidth_val;
> -    char *adaptionset_minheight_val;
> -    char *adaptionset_maxheight_val;
> -    char *adaptionset_minframerate_val;
> -    char *adaptionset_maxframerate_val;
> -    char *adaptionset_segmentalignment_val;
> -    char *adaptionset_bitstreamswitching_val;
>  
>      int n_videos;
>      struct representation **videos;
> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>                                          xmlNodePtr period_segmentlist_node)
>  {
>      int ret = 0;
> -    DASHContext *c = s->priv_data;
>      xmlNodePtr fragment_template_node = NULL;
>      xmlNodePtr content_component_node = NULL;
>      xmlNodePtr adaptionset_baseurl_node = NULL;
>      xmlNodePtr adaptionset_segmentlist_node = NULL;
>      xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>      xmlNodePtr node = NULL;
> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>  
>      node = xmlFirstElementChild(adaptionset_node);
>      while (node) {
> 
Is there a reason you are not simply using my patch for this? It has a
better commit message. Do you mind if I apply my patch?

- Andreas
Steven Liu March 28, 2020, 11:58 p.m. UTC | #2
> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>> 
>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>> ---
>> libavformat/dashdec.c | 27 ---------------------------
>> 1 file changed, 27 deletions(-)
>> 
>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>> index 5bbe5d3985..271202b0a5 100644
>> --- a/libavformat/dashdec.c
>> +++ b/libavformat/dashdec.c
>> @@ -122,19 +122,6 @@ struct representation {
>> typedef struct DASHContext {
>>     const AVClass *class;
>>     char *base_url;
>> -    char *adaptionset_contenttype_val;
>> -    char *adaptionset_par_val;
>> -    char *adaptionset_lang_val;
>> -    char *adaptionset_minbw_val;
>> -    char *adaptionset_maxbw_val;
>> -    char *adaptionset_minwidth_val;
>> -    char *adaptionset_maxwidth_val;
>> -    char *adaptionset_minheight_val;
>> -    char *adaptionset_maxheight_val;
>> -    char *adaptionset_minframerate_val;
>> -    char *adaptionset_maxframerate_val;
>> -    char *adaptionset_segmentalignment_val;
>> -    char *adaptionset_bitstreamswitching_val;
>> 
>>     int n_videos;
>>     struct representation **videos;
>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>                                         xmlNodePtr period_segmentlist_node)
>> {
>>     int ret = 0;
>> -    DASHContext *c = s->priv_data;
>>     xmlNodePtr fragment_template_node = NULL;
>>     xmlNodePtr content_component_node = NULL;
>>     xmlNodePtr adaptionset_baseurl_node = NULL;
>>     xmlNodePtr adaptionset_segmentlist_node = NULL;
>>     xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>     xmlNodePtr node = NULL;
>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>> 
>>     node = xmlFirstElementChild(adaptionset_node);
>>     while (node) {
>> 
> Is there a reason you are not simply using my patch for this? It has a
> better commit message. Do you mind if I apply my patch?
This is revert, your patch is delete, isn't it?
> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
Andreas Rheinhardt March 29, 2020, 12:03 a.m. UTC | #3
Steven Liu:
> 
> 
>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>
>> Steven Liu:
>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>
>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>> ---
>>> libavformat/dashdec.c | 27 ---------------------------
>>> 1 file changed, 27 deletions(-)
>>>
>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>> index 5bbe5d3985..271202b0a5 100644
>>> --- a/libavformat/dashdec.c
>>> +++ b/libavformat/dashdec.c
>>> @@ -122,19 +122,6 @@ struct representation {
>>> typedef struct DASHContext {
>>>     const AVClass *class;
>>>     char *base_url;
>>> -    char *adaptionset_contenttype_val;
>>> -    char *adaptionset_par_val;
>>> -    char *adaptionset_lang_val;
>>> -    char *adaptionset_minbw_val;
>>> -    char *adaptionset_maxbw_val;
>>> -    char *adaptionset_minwidth_val;
>>> -    char *adaptionset_maxwidth_val;
>>> -    char *adaptionset_minheight_val;
>>> -    char *adaptionset_maxheight_val;
>>> -    char *adaptionset_minframerate_val;
>>> -    char *adaptionset_maxframerate_val;
>>> -    char *adaptionset_segmentalignment_val;
>>> -    char *adaptionset_bitstreamswitching_val;
>>>
>>>     int n_videos;
>>>     struct representation **videos;
>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>                                         xmlNodePtr period_segmentlist_node)
>>> {
>>>     int ret = 0;
>>> -    DASHContext *c = s->priv_data;
>>>     xmlNodePtr fragment_template_node = NULL;
>>>     xmlNodePtr content_component_node = NULL;
>>>     xmlNodePtr adaptionset_baseurl_node = NULL;
>>>     xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>     xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>     xmlNodePtr node = NULL;
>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>
>>>     node = xmlFirstElementChild(adaptionset_node);
>>>     while (node) {
>>>
>> Is there a reason you are not simply using my patch for this? It has a
>> better commit message. Do you mind if I apply my patch?
> This is revert, your patch is delete, isn't it?

My patch has the same diff as yours. Given that the patch to be reverted
didn't delete anything, its revert just removes lines and doesn't add
any old lines back.

- Andreas
Steven Liu March 29, 2020, 12:05 a.m. UTC | #4
> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> 
>> 
>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>> 
>>> Steven Liu:
>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>> 
>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>> ---
>>>> libavformat/dashdec.c | 27 ---------------------------
>>>> 1 file changed, 27 deletions(-)
>>>> 
>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>> index 5bbe5d3985..271202b0a5 100644
>>>> --- a/libavformat/dashdec.c
>>>> +++ b/libavformat/dashdec.c
>>>> @@ -122,19 +122,6 @@ struct representation {
>>>> typedef struct DASHContext {
>>>>    const AVClass *class;
>>>>    char *base_url;
>>>> -    char *adaptionset_contenttype_val;
>>>> -    char *adaptionset_par_val;
>>>> -    char *adaptionset_lang_val;
>>>> -    char *adaptionset_minbw_val;
>>>> -    char *adaptionset_maxbw_val;
>>>> -    char *adaptionset_minwidth_val;
>>>> -    char *adaptionset_maxwidth_val;
>>>> -    char *adaptionset_minheight_val;
>>>> -    char *adaptionset_maxheight_val;
>>>> -    char *adaptionset_minframerate_val;
>>>> -    char *adaptionset_maxframerate_val;
>>>> -    char *adaptionset_segmentalignment_val;
>>>> -    char *adaptionset_bitstreamswitching_val;
>>>> 
>>>>    int n_videos;
>>>>    struct representation **videos;
>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>                                        xmlNodePtr period_segmentlist_node)
>>>> {
>>>>    int ret = 0;
>>>> -    DASHContext *c = s->priv_data;
>>>>    xmlNodePtr fragment_template_node = NULL;
>>>>    xmlNodePtr content_component_node = NULL;
>>>>    xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>    xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>    xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>    xmlNodePtr node = NULL;
>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>> 
>>>>    node = xmlFirstElementChild(adaptionset_node);
>>>>    while (node) {
>>>> 
>>> Is there a reason you are not simply using my patch for this? It has a
>>> better commit message. Do you mind if I apply my patch?
>> This is revert, your patch is delete, isn't it?
> 
> My patch has the same diff as yours. Given that the patch to be reverted
> didn't delete anything, its revert just removes lines and doesn't add
> any old lines back.
No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
Steven Liu March 29, 2020, 12:09 a.m. UTC | #5
> 2020年3月29日 上午8:05,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
> 
>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>> 
>> Steven Liu:
>>> 
>>> 
>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>> 
>>>> Steven Liu:
>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>> 
>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>> ---
>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>> 1 file changed, 27 deletions(-)
>>>>> 
>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>> --- a/libavformat/dashdec.c
>>>>> +++ b/libavformat/dashdec.c
>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>> typedef struct DASHContext {
>>>>>   const AVClass *class;
>>>>>   char *base_url;
>>>>> -    char *adaptionset_contenttype_val;
>>>>> -    char *adaptionset_par_val;
>>>>> -    char *adaptionset_lang_val;
>>>>> -    char *adaptionset_minbw_val;
>>>>> -    char *adaptionset_maxbw_val;
>>>>> -    char *adaptionset_minwidth_val;
>>>>> -    char *adaptionset_maxwidth_val;
>>>>> -    char *adaptionset_minheight_val;
>>>>> -    char *adaptionset_maxheight_val;
>>>>> -    char *adaptionset_minframerate_val;
>>>>> -    char *adaptionset_maxframerate_val;
>>>>> -    char *adaptionset_segmentalignment_val;
>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>> 
>>>>>   int n_videos;
>>>>>   struct representation **videos;
>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>                                       xmlNodePtr period_segmentlist_node)
>>>>> {
>>>>>   int ret = 0;
>>>>> -    DASHContext *c = s->priv_data;
>>>>>   xmlNodePtr fragment_template_node = NULL;
>>>>>   xmlNodePtr content_component_node = NULL;
>>>>>   xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>   xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>   xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>   xmlNodePtr node = NULL;
>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>> 
>>>>>   node = xmlFirstElementChild(adaptionset_node);
>>>>>   while (node) {
>>>>> 
>>>> Is there a reason you are not simply using my patch for this? It has a
>>>> better commit message. Do you mind if I apply my patch?
>>> This is revert, your patch is delete, isn't it?
>> 
>> My patch has the same diff as yours. Given that the patch to be reverted
>> didn't delete anything, its revert just removes lines and doesn't add
>> any old lines back.
> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
Example:
After revert, you cannot find the commit use git log
e134c20374ee3cbc6d04885d306b02c9871683a2.

But after your patch, you can find the commit use git log
e134c20374ee3cbc6d04885d306b02c9871683a2.

>> 
>> - Andreas
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> Thanks
> 
> Steven Liu
> 

Thanks

Steven Liu
Andreas Rheinhardt March 29, 2020, 12:12 a.m. UTC | #6
Steven Liu:
> 
> 
>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>
>> Steven Liu:
>>>
>>>
>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>
>>>> Steven Liu:
>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>
>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>> ---
>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>> 1 file changed, 27 deletions(-)
>>>>>
>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>> --- a/libavformat/dashdec.c
>>>>> +++ b/libavformat/dashdec.c
>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>> typedef struct DASHContext {
>>>>>    const AVClass *class;
>>>>>    char *base_url;
>>>>> -    char *adaptionset_contenttype_val;
>>>>> -    char *adaptionset_par_val;
>>>>> -    char *adaptionset_lang_val;
>>>>> -    char *adaptionset_minbw_val;
>>>>> -    char *adaptionset_maxbw_val;
>>>>> -    char *adaptionset_minwidth_val;
>>>>> -    char *adaptionset_maxwidth_val;
>>>>> -    char *adaptionset_minheight_val;
>>>>> -    char *adaptionset_maxheight_val;
>>>>> -    char *adaptionset_minframerate_val;
>>>>> -    char *adaptionset_maxframerate_val;
>>>>> -    char *adaptionset_segmentalignment_val;
>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>
>>>>>    int n_videos;
>>>>>    struct representation **videos;
>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>                                        xmlNodePtr period_segmentlist_node)
>>>>> {
>>>>>    int ret = 0;
>>>>> -    DASHContext *c = s->priv_data;
>>>>>    xmlNodePtr fragment_template_node = NULL;
>>>>>    xmlNodePtr content_component_node = NULL;
>>>>>    xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>    xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>    xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>    xmlNodePtr node = NULL;
>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>
>>>>>    node = xmlFirstElementChild(adaptionset_node);
>>>>>    while (node) {
>>>>>
>>>> Is there a reason you are not simply using my patch for this? It has a
>>>> better commit message. Do you mind if I apply my patch?
>>> This is revert, your patch is delete, isn't it?
>>
>> My patch has the same diff as yours. Given that the patch to be reverted
>> didn't delete anything, its revert just removes lines and doesn't add
>> any old lines back.
> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.

What? A revert (whether it is yours or mine) is a patch on top of
current master (or on top of the old branches that you backport it to);
it does not remove the old commit from the repo. Removing the old commit
would only be possible if one rewrote history, but this should never be
done as soon as others have based work on it (for FFmpeg this means:
what has been committed to the main repo can never be removed, only
reverted; but you can rewrite history of your private developer branches
any time).

- Andreas
Steven Liu March 29, 2020, 12:17 a.m. UTC | #7
> 2020年3月29日 上午8:12,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> 
>> 
>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>> 
>>> Steven Liu:
>>>> 
>>>> 
>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>> 
>>>>> Steven Liu:
>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>> 
>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>> ---
>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>> 1 file changed, 27 deletions(-)
>>>>>> 
>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>> --- a/libavformat/dashdec.c
>>>>>> +++ b/libavformat/dashdec.c
>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>> typedef struct DASHContext {
>>>>>>   const AVClass *class;
>>>>>>   char *base_url;
>>>>>> -    char *adaptionset_contenttype_val;
>>>>>> -    char *adaptionset_par_val;
>>>>>> -    char *adaptionset_lang_val;
>>>>>> -    char *adaptionset_minbw_val;
>>>>>> -    char *adaptionset_maxbw_val;
>>>>>> -    char *adaptionset_minwidth_val;
>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>> -    char *adaptionset_minheight_val;
>>>>>> -    char *adaptionset_maxheight_val;
>>>>>> -    char *adaptionset_minframerate_val;
>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>> 
>>>>>>   int n_videos;
>>>>>>   struct representation **videos;
>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>                                       xmlNodePtr period_segmentlist_node)
>>>>>> {
>>>>>>   int ret = 0;
>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>   xmlNodePtr fragment_template_node = NULL;
>>>>>>   xmlNodePtr content_component_node = NULL;
>>>>>>   xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>   xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>   xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>   xmlNodePtr node = NULL;
>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>> 
>>>>>>   node = xmlFirstElementChild(adaptionset_node);
>>>>>>   while (node) {
>>>>>> 
>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>> better commit message. Do you mind if I apply my patch?
>>>> This is revert, your patch is delete, isn't it?
>>> 
>>> My patch has the same diff as yours. Given that the patch to be reverted
>>> didn't delete anything, its revert just removes lines and doesn't add
>>> any old lines back.
>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
> 
> What? A revert (whether it is yours or mine) is a patch on top of
> current master (or on top of the old branches that you backport it to);
> it does not remove the old commit from the repo. Removing the old commit
> would only be possible if one rewrote history, but this should never be
> done as soon as others have based work on it (for FFmpeg this means:
> what has been committed to the main repo can never be removed, only
> reverted; but you can rewrite history of your private developer branches
> any time).
For example:

commit de1b2aa7968343fe70ca924f473d9b53eeb85490
Author: Guo, Yejun <yejun.guo@intel.com>
Date:   Wed Jan 29 01:15:28 2020 +0100

    Revert "fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32"

    The tests broke fate without SAMPLES and fate on some platforms.
    This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.

(base) liuqi05:ffmpeg liuqi$ git log | grep 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
    This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
(base) liuqi05:ffmpeg liuqi$

It’s not a patch, just revert the commit.

> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
Andreas Rheinhardt March 29, 2020, 12:20 a.m. UTC | #8
Steven Liu:
> 
> 
>> 2020年3月29日 上午8:05,Steven Liu <lq@chinaffmpeg.org> 写道:
>>
>>
>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>
>>> Steven Liu:
>>>>
>>>>
>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>>
>>>>> Steven Liu:
>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>>
>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>> ---
>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>> 1 file changed, 27 deletions(-)
>>>>>>
>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>> --- a/libavformat/dashdec.c
>>>>>> +++ b/libavformat/dashdec.c
>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>> typedef struct DASHContext {
>>>>>>   const AVClass *class;
>>>>>>   char *base_url;
>>>>>> -    char *adaptionset_contenttype_val;
>>>>>> -    char *adaptionset_par_val;
>>>>>> -    char *adaptionset_lang_val;
>>>>>> -    char *adaptionset_minbw_val;
>>>>>> -    char *adaptionset_maxbw_val;
>>>>>> -    char *adaptionset_minwidth_val;
>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>> -    char *adaptionset_minheight_val;
>>>>>> -    char *adaptionset_maxheight_val;
>>>>>> -    char *adaptionset_minframerate_val;
>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>>
>>>>>>   int n_videos;
>>>>>>   struct representation **videos;
>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>                                       xmlNodePtr period_segmentlist_node)
>>>>>> {
>>>>>>   int ret = 0;
>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>   xmlNodePtr fragment_template_node = NULL;
>>>>>>   xmlNodePtr content_component_node = NULL;
>>>>>>   xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>   xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>   xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>   xmlNodePtr node = NULL;
>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>>
>>>>>>   node = xmlFirstElementChild(adaptionset_node);
>>>>>>   while (node) {
>>>>>>
>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>> better commit message. Do you mind if I apply my patch?
>>>> This is revert, your patch is delete, isn't it?
>>>
>>> My patch has the same diff as yours. Given that the patch to be reverted
>>> didn't delete anything, its revert just removes lines and doesn't add
>>> any old lines back.
>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
> Example:
> After revert, you cannot find the commit use git log
> e134c20374ee3cbc6d04885d306b02c9871683a2.
> 
This is wrong. You can still find the commit with "git log
e134c20374ee3cbc6d04885d306b02c9871683a2" or "git show
e134c20374ee3cbc6d04885d306b02c9871683a2" and other git tools.

> But after your patch, you can find the commit use git log
> e134c20374ee3cbc6d04885d306b02c9871683a2.

And actually it is intended that the commit can still be found (after
all, this commit is part of FFmpeg's history).

- Andreas
Steven Liu March 29, 2020, 12:23 a.m. UTC | #9
> 2020年3月29日 上午8:20,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> 
>> 
>>> 2020年3月29日 上午8:05,Steven Liu <lq@chinaffmpeg.org> 写道:
>>> 
>>> 
>>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>> 
>>>> Steven Liu:
>>>>> 
>>>>> 
>>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>>> 
>>>>>> Steven Liu:
>>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>>> 
>>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>>> ---
>>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>>> 1 file changed, 27 deletions(-)
>>>>>>> 
>>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>>> --- a/libavformat/dashdec.c
>>>>>>> +++ b/libavformat/dashdec.c
>>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>>> typedef struct DASHContext {
>>>>>>>  const AVClass *class;
>>>>>>>  char *base_url;
>>>>>>> -    char *adaptionset_contenttype_val;
>>>>>>> -    char *adaptionset_par_val;
>>>>>>> -    char *adaptionset_lang_val;
>>>>>>> -    char *adaptionset_minbw_val;
>>>>>>> -    char *adaptionset_maxbw_val;
>>>>>>> -    char *adaptionset_minwidth_val;
>>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>>> -    char *adaptionset_minheight_val;
>>>>>>> -    char *adaptionset_maxheight_val;
>>>>>>> -    char *adaptionset_minframerate_val;
>>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>>> 
>>>>>>>  int n_videos;
>>>>>>>  struct representation **videos;
>>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>>                                      xmlNodePtr period_segmentlist_node)
>>>>>>> {
>>>>>>>  int ret = 0;
>>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>>  xmlNodePtr fragment_template_node = NULL;
>>>>>>>  xmlNodePtr content_component_node = NULL;
>>>>>>>  xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>>  xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>>  xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>>  xmlNodePtr node = NULL;
>>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>>> 
>>>>>>>  node = xmlFirstElementChild(adaptionset_node);
>>>>>>>  while (node) {
>>>>>>> 
>>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>>> better commit message. Do you mind if I apply my patch?
>>>>> This is revert, your patch is delete, isn't it?
>>>> 
>>>> My patch has the same diff as yours. Given that the patch to be reverted
>>>> didn't delete anything, its revert just removes lines and doesn't add
>>>> any old lines back.
>>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
>> Example:
>> After revert, you cannot find the commit use git log
>> e134c20374ee3cbc6d04885d306b02c9871683a2.
>> 
> This is wrong. You can still find the commit with "git log
> e134c20374ee3cbc6d04885d306b02c9871683a2" or "git show
> e134c20374ee3cbc6d04885d306b02c9871683a2" and other git tools.
> 
>> But after your patch, you can find the commit use git log
>> e134c20374ee3cbc6d04885d306b02c9871683a2.
> 
> And actually it is intended that the commit can still be found (after
> all, this commit is part of FFmpeg's history).
Other example:

(base) liuqi05:ffmpeg liuqi$ git show dbd3dbb4766126a806e7aeaa3e2dfbc3557f66f9
commit dbd3dbb4766126a806e7aeaa3e2dfbc3557f66f9
Author: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date:   Thu Sep 26 00:34:44 2019 +0200

    Revert "lavc/tiff: correct the default value of YCbCrSubsampling to 2x2"

    This reverts commit eb5d0f18ff609ba2280cea4e2c6286d216c8756b.

    Together with 89f464e9, it breaks decoding of tiff files like fate-suite/exif/image_small.tiff

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c8b2a3680e..9f24796a88 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -2065,7 +2065,7 @@ static av_cold int tiff_init(AVCodecContext *avctx)
     s->width  = 0;
     s->height = 0;
     s->subsampling[0] =
-    s->subsampling[1] = 2;
+    s->subsampling[1] = 1;
     s->avctx  = avctx;
     ff_lzw_decode_open(&s->lzw);
     if (!s->lzw)
(base) liuqi05:ffmpeg liuqi$ git log |grep eb5d0f18ff609ba2280cea4e2c6286d216c8756b.
    This reverts commit eb5d0f18ff609ba2280cea4e2c6286d216c8756b.
(base) liuqi05:ffmpeg liuqi$


> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
Andreas Rheinhardt March 29, 2020, 12:24 a.m. UTC | #10
Steven Liu:
> 
> 
>> 2020年3月29日 上午8:12,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>
>> Steven Liu:
>>>
>>>
>>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>
>>>> Steven Liu:
>>>>>
>>>>>
>>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>>>
>>>>>> Steven Liu:
>>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>>>
>>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>>> ---
>>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>>> 1 file changed, 27 deletions(-)
>>>>>>>
>>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>>> --- a/libavformat/dashdec.c
>>>>>>> +++ b/libavformat/dashdec.c
>>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>>> typedef struct DASHContext {
>>>>>>>   const AVClass *class;
>>>>>>>   char *base_url;
>>>>>>> -    char *adaptionset_contenttype_val;
>>>>>>> -    char *adaptionset_par_val;
>>>>>>> -    char *adaptionset_lang_val;
>>>>>>> -    char *adaptionset_minbw_val;
>>>>>>> -    char *adaptionset_maxbw_val;
>>>>>>> -    char *adaptionset_minwidth_val;
>>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>>> -    char *adaptionset_minheight_val;
>>>>>>> -    char *adaptionset_maxheight_val;
>>>>>>> -    char *adaptionset_minframerate_val;
>>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>>>
>>>>>>>   int n_videos;
>>>>>>>   struct representation **videos;
>>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>>                                       xmlNodePtr period_segmentlist_node)
>>>>>>> {
>>>>>>>   int ret = 0;
>>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>>   xmlNodePtr fragment_template_node = NULL;
>>>>>>>   xmlNodePtr content_component_node = NULL;
>>>>>>>   xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>>   xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>>   xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>>   xmlNodePtr node = NULL;
>>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>>>
>>>>>>>   node = xmlFirstElementChild(adaptionset_node);
>>>>>>>   while (node) {
>>>>>>>
>>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>>> better commit message. Do you mind if I apply my patch?
>>>>> This is revert, your patch is delete, isn't it?
>>>>
>>>> My patch has the same diff as yours. Given that the patch to be reverted
>>>> didn't delete anything, its revert just removes lines and doesn't add
>>>> any old lines back.
>>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
>>
>> What? A revert (whether it is yours or mine) is a patch on top of
>> current master (or on top of the old branches that you backport it to);
>> it does not remove the old commit from the repo. Removing the old commit
>> would only be possible if one rewrote history, but this should never be
>> done as soon as others have based work on it (for FFmpeg this means:
>> what has been committed to the main repo can never be removed, only
>> reverted; but you can rewrite history of your private developer branches
>> any time).
> For example:
> 
> commit de1b2aa7968343fe70ca924f473d9b53eeb85490
> Author: Guo, Yejun <yejun.guo@intel.com>
> Date:   Wed Jan 29 01:15:28 2020 +0100
> 
>     Revert "fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32"
> 
>     The tests broke fate without SAMPLES and fate on some platforms.
>     This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
> 
> (base) liuqi05:ffmpeg liuqi$ git log | grep 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>     This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
> (base) liuqi05:ffmpeg liuqi$

The reason this command finds only one of the two commits is that you
added the "." at the end. If you left it out, you would get both the
original commit as well as the reverted commit.

- Andreas
Steven Liu March 29, 2020, 12:29 a.m. UTC | #11
> 2020年3月29日 上午8:24,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> 
>> 
>>> 2020年3月29日 上午8:12,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>> 
>>> Steven Liu:
>>>> 
>>>> 
>>>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>> 
>>>>> Steven Liu:
>>>>>> 
>>>>>> 
>>>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>>>> 
>>>>>>> Steven Liu:
>>>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>>>> 
>>>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>>>> ---
>>>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>>>> 1 file changed, 27 deletions(-)
>>>>>>>> 
>>>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>>>> --- a/libavformat/dashdec.c
>>>>>>>> +++ b/libavformat/dashdec.c
>>>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>>>> typedef struct DASHContext {
>>>>>>>>  const AVClass *class;
>>>>>>>>  char *base_url;
>>>>>>>> -    char *adaptionset_contenttype_val;
>>>>>>>> -    char *adaptionset_par_val;
>>>>>>>> -    char *adaptionset_lang_val;
>>>>>>>> -    char *adaptionset_minbw_val;
>>>>>>>> -    char *adaptionset_maxbw_val;
>>>>>>>> -    char *adaptionset_minwidth_val;
>>>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>>>> -    char *adaptionset_minheight_val;
>>>>>>>> -    char *adaptionset_maxheight_val;
>>>>>>>> -    char *adaptionset_minframerate_val;
>>>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>>>> 
>>>>>>>>  int n_videos;
>>>>>>>>  struct representation **videos;
>>>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>>>                                      xmlNodePtr period_segmentlist_node)
>>>>>>>> {
>>>>>>>>  int ret = 0;
>>>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>>>  xmlNodePtr fragment_template_node = NULL;
>>>>>>>>  xmlNodePtr content_component_node = NULL;
>>>>>>>>  xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>>>  xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>>>  xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>>>  xmlNodePtr node = NULL;
>>>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>>>> 
>>>>>>>>  node = xmlFirstElementChild(adaptionset_node);
>>>>>>>>  while (node) {
>>>>>>>> 
>>>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>>>> better commit message. Do you mind if I apply my patch?
>>>>>> This is revert, your patch is delete, isn't it?
>>>>> 
>>>>> My patch has the same diff as yours. Given that the patch to be reverted
>>>>> didn't delete anything, its revert just removes lines and doesn't add
>>>>> any old lines back.
>>>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
>>> 
>>> What? A revert (whether it is yours or mine) is a patch on top of
>>> current master (or on top of the old branches that you backport it to);
>>> it does not remove the old commit from the repo. Removing the old commit
>>> would only be possible if one rewrote history, but this should never be
>>> done as soon as others have based work on it (for FFmpeg this means:
>>> what has been committed to the main repo can never be removed, only
>>> reverted; but you can rewrite history of your private developer branches
>>> any time).
>> For example:
>> 
>> commit de1b2aa7968343fe70ca924f473d9b53eeb85490
>> Author: Guo, Yejun <yejun.guo@intel.com>
>> Date:   Wed Jan 29 01:15:28 2020 +0100
>> 
>>    Revert "fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32"
>> 
>>    The tests broke fate without SAMPLES and fate on some platforms.
>>    This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>> 
>> (base) liuqi05:ffmpeg liuqi$ git log | grep 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>>    This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>> (base) liuqi05:ffmpeg liuqi$
> 
> The reason this command finds only one of the two commits is that you
> added the "." at the end. If you left it out, you would get both the
> original commit as well as the reverted commit.
Ah, yes, your are right, it’s my mistake, I misunderstood the revert past,
It should merge your patch if this cannot erise the old commit.
> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
Steven Liu March 29, 2020, 12:30 a.m. UTC | #12
> 2020年3月29日 上午8:24,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
> 
> Steven Liu:
>> 
>> 
>>> 2020年3月29日 上午8:12,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>> 
>>> Steven Liu:
>>>> 
>>>> 
>>>>> 2020年3月29日 上午8:03,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>> 
>>>>> Steven Liu:
>>>>>> 
>>>>>> 
>>>>>>> 2020年3月29日 上午7:48,Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 写道:
>>>>>>> 
>>>>>>> Steven Liu:
>>>>>>>> This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.
>>>>>>>> 
>>>>>>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>>>>>>> ---
>>>>>>>> libavformat/dashdec.c | 27 ---------------------------
>>>>>>>> 1 file changed, 27 deletions(-)
>>>>>>>> 
>>>>>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>>>>>> index 5bbe5d3985..271202b0a5 100644
>>>>>>>> --- a/libavformat/dashdec.c
>>>>>>>> +++ b/libavformat/dashdec.c
>>>>>>>> @@ -122,19 +122,6 @@ struct representation {
>>>>>>>> typedef struct DASHContext {
>>>>>>>> const AVClass *class;
>>>>>>>> char *base_url;
>>>>>>>> -    char *adaptionset_contenttype_val;
>>>>>>>> -    char *adaptionset_par_val;
>>>>>>>> -    char *adaptionset_lang_val;
>>>>>>>> -    char *adaptionset_minbw_val;
>>>>>>>> -    char *adaptionset_maxbw_val;
>>>>>>>> -    char *adaptionset_minwidth_val;
>>>>>>>> -    char *adaptionset_maxwidth_val;
>>>>>>>> -    char *adaptionset_minheight_val;
>>>>>>>> -    char *adaptionset_maxheight_val;
>>>>>>>> -    char *adaptionset_minframerate_val;
>>>>>>>> -    char *adaptionset_maxframerate_val;
>>>>>>>> -    char *adaptionset_segmentalignment_val;
>>>>>>>> -    char *adaptionset_bitstreamswitching_val;
>>>>>>>> 
>>>>>>>> int n_videos;
>>>>>>>> struct representation **videos;
>>>>>>>> @@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
>>>>>>>>                                     xmlNodePtr period_segmentlist_node)
>>>>>>>> {
>>>>>>>> int ret = 0;
>>>>>>>> -    DASHContext *c = s->priv_data;
>>>>>>>> xmlNodePtr fragment_template_node = NULL;
>>>>>>>> xmlNodePtr content_component_node = NULL;
>>>>>>>> xmlNodePtr adaptionset_baseurl_node = NULL;
>>>>>>>> xmlNodePtr adaptionset_segmentlist_node = NULL;
>>>>>>>> xmlNodePtr adaptionset_supplementalproperty_node = NULL;
>>>>>>>> xmlNodePtr node = NULL;
>>>>>>>> -    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
>>>>>>>> -    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
>>>>>>>> -    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
>>>>>>>> -    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
>>>>>>>> -    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
>>>>>>>> -    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
>>>>>>>> -    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
>>>>>>>> -    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
>>>>>>>> -    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
>>>>>>>> -    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
>>>>>>>> -    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
>>>>>>>> -    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
>>>>>>>> -    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
>>>>>>>> 
>>>>>>>> node = xmlFirstElementChild(adaptionset_node);
>>>>>>>> while (node) {
>>>>>>>> 
>>>>>>> Is there a reason you are not simply using my patch for this? It has a
>>>>>>> better commit message. Do you mind if I apply my patch?
>>>>>> This is revert, your patch is delete, isn't it?
>>>>> 
>>>>> My patch has the same diff as yours. Given that the patch to be reverted
>>>>> didn't delete anything, its revert just removes lines and doesn't add
>>>>> any old lines back.
>>>> No, your patch is a patch commit, this is a git revert, this can revert the old commit, your patch can save old commit.
>>> 
>>> What? A revert (whether it is yours or mine) is a patch on top of
>>> current master (or on top of the old branches that you backport it to);
>>> it does not remove the old commit from the repo. Removing the old commit
>>> would only be possible if one rewrote history, but this should never be
>>> done as soon as others have based work on it (for FFmpeg this means:
>>> what has been committed to the main repo can never be removed, only
>>> reverted; but you can rewrite history of your private developer branches
>>> any time).
>> For example:
>> 
>> commit de1b2aa7968343fe70ca924f473d9b53eeb85490
>> Author: Guo, Yejun <yejun.guo@intel.com>
>> Date:   Wed Jan 29 01:15:28 2020 +0100
>> 
>>   Revert "fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32"
>> 
>>   The tests broke fate without SAMPLES and fate on some platforms.
>>   This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>> 
>> (base) liuqi05:ffmpeg liuqi$ git log | grep 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>>   This reverts commit 95ade711eb4afb8b76a765ef6571e7934ad7f8cc.
>> (base) liuqi05:ffmpeg liuqi$
> 
> The reason this command finds only one of the two commits is that you
> added the "." at the end. If you left it out, you would get both the
> original commit as well as the reverted commit.
Ah, yes, your are right, it’s my mistake, I misunderstood the revert past,
It should merge your patch if this cannot erise the old commit.
> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks

Steven Liu
diff mbox series

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 5bbe5d3985..271202b0a5 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -122,19 +122,6 @@  struct representation {
 typedef struct DASHContext {
     const AVClass *class;
     char *base_url;
-    char *adaptionset_contenttype_val;
-    char *adaptionset_par_val;
-    char *adaptionset_lang_val;
-    char *adaptionset_minbw_val;
-    char *adaptionset_maxbw_val;
-    char *adaptionset_minwidth_val;
-    char *adaptionset_maxwidth_val;
-    char *adaptionset_minheight_val;
-    char *adaptionset_maxheight_val;
-    char *adaptionset_minframerate_val;
-    char *adaptionset_maxframerate_val;
-    char *adaptionset_segmentalignment_val;
-    char *adaptionset_bitstreamswitching_val;
 
     int n_videos;
     struct representation **videos;
@@ -1124,26 +1111,12 @@  static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
                                         xmlNodePtr period_segmentlist_node)
 {
     int ret = 0;
-    DASHContext *c = s->priv_data;
     xmlNodePtr fragment_template_node = NULL;
     xmlNodePtr content_component_node = NULL;
     xmlNodePtr adaptionset_baseurl_node = NULL;
     xmlNodePtr adaptionset_segmentlist_node = NULL;
     xmlNodePtr adaptionset_supplementalproperty_node = NULL;
     xmlNodePtr node = NULL;
-    c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
-    c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
-    c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
-    c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
-    c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
-    c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
-    c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
-    c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
-    c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
-    c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
-    c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
-    c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
-    c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
 
     node = xmlFirstElementChild(adaptionset_node);
     while (node) {