Merge commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:23:26 +0000 (23:23 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:23:26 +0000 (23:23 +0100)
* commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15':
  rtpdec_hevc: Share the implementation of fragmented packets 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
@@@ -257,7 -257,28 +257,28 @@@ int ff_h264_handle_aggregated_packet(AV
      return 0;
  }
  
 -static int h264_handle_packet_fu_a(AVFormatContext *ctx, AVPacket *pkt,
+ int ff_h264_handle_frag_packet(AVPacket *pkt, const uint8_t *buf, int len,
+                                int start_bit, const uint8_t *nal_header,
+                                int nal_header_len)
+ {
+     int ret;
+     int tot_len = len;
+     int pos = 0;
+     if (start_bit)
+         tot_len += sizeof(start_sequence) + nal_header_len;
+     if ((ret = av_new_packet(pkt, tot_len)) < 0)
+         return ret;
+     if (start_bit) {
+         memcpy(pkt->data + pos, start_sequence, sizeof(start_sequence));
+         pos += sizeof(start_sequence);
+         memcpy(pkt->data + pos, nal_header, nal_header_len);
+         pos += nal_header_len;
+     }
+     memcpy(pkt->data + pos, buf, len);
+     return 0;
+ }
 +static int h264_handle_packet_fu_a(AVFormatContext *ctx, PayloadContext *data, AVPacket *pkt,
                                     const uint8_t *buf, int len,
                                     int *nal_counters, int nal_mask)
  {
Simple merge