Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Dec 2014 02:57:12 +0000 (03:57 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Dec 2014 02:57:59 +0000 (03:57 +0100)
* commit '5d839778b9f3edb682b7f71dde4f80f07c75b098':
  lavu: Refactor side data wiping

Conflicts:
libavutil/frame.c

See: a400edbb6d00c0211de38e4f1b4f593681db91d8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavutil/frame.c

index 5c9aa2914ccef81a9a75b6d04ad2c1da560ccad7,32ec47066b90f08523220fa3695232ff7f0d3dc5..12fe0a62733fc0dc995c7cec1797532ac7e0210c
@@@ -492,18 -404,10 +501,14 @@@ int av_frame_copy_props(AVFrame *dst, c
  
      for (i = 0; i < src->nb_side_data; i++) {
          const AVFrameSideData *sd_src = src->side_data[i];
 -        AVFrameSideData *sd_dst = av_frame_new_side_data(dst, sd_src->type,
 +        AVFrameSideData *sd_dst;
 +        if (   sd_src->type == AV_FRAME_DATA_PANSCAN
 +            && (src->width != dst->width || src->height != dst->height))
 +            continue;
 +        sd_dst = av_frame_new_side_data(dst, sd_src->type,
                                                           sd_src->size);
          if (!sd_dst) {
-             for (i = 0; i < dst->nb_side_data; i++) {
-                 free_side_data(&dst->side_data[i]);
-             }
-             av_freep(&dst->side_data);
-             dst->nb_side_data = 0;
+             wipe_side_data(dst);
              return AVERROR(ENOMEM);
          }
          memcpy(sd_dst->data, sd_src->data, sd_src->size);