Merge commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:03:12 +0000 (23:03 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:03:12 +0000 (23:03 +0100)
* commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0':
  rtpdec_hevc: Share the implementation of parsing a=framesize with h264

Conflicts:
libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/rtpdec_formats.h
libavformat/rtpdec_h264.c
libavformat/rtpdec_hevc.c

Simple merge
@@@ -177,7 -177,29 +177,29 @@@ static int sdp_parse_fmtp_config_h264(A
      return 0;
  }
  
 -int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
+ void ff_h264_parse_framesize(AVCodecContext *codec, const char *p)
+ {
+     char buf1[50];
+     char *dst = buf1;
+     // remove the protocol identifier
+     while (*p && *p == ' ')
+         p++;                     // strip spaces.
+     while (*p && *p != ' ')
+         p++;                     // eat protocol identifier
+     while (*p && *p == ' ')
+         p++;                     // strip trailing spaces.
+     while (*p && *p != '-' && (dst - buf1) < sizeof(buf1) - 1)
+         *dst++ = *p++;
+     *dst = '\0';
+     // a='framesize:96 320-240'
+     // set our parameters
+     codec->width   = atoi(buf1);
+     codec->height  = atoi(p + 1); // skip the -
+ }
 +int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, AVPacket *pkt,
                                       const uint8_t *buf, int len,
                                       int skip_between, int *nal_counters,
                                       int nal_mask)
Simple merge