Commit f3b6a8f5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '53367b34'

* commit '53367b34':
  rtp: h264: Drop the asserts

Conflicts:
	libavformat/rtpdec_h264.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a848cf63 53367b34
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "avformat.h" #include "avformat.h"
#include "network.h" #include "network.h"
#include <assert.h>
#include "rtpdec.h" #include "rtpdec.h"
#include "rtpdec_formats.h" #include "rtpdec_formats.h"
...@@ -153,8 +152,6 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, ...@@ -153,8 +152,6 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
char *attr, char *value) char *attr, char *value)
{ {
AVCodecContext *codec = stream->codec; AVCodecContext *codec = stream->codec;
assert(codec->codec_id == AV_CODEC_ID_H264);
assert(h264_data);
if (!strcmp(attr, "packetization-mode")) { if (!strcmp(attr, "packetization-mode")) {
av_log(s, AV_LOG_DEBUG, "RTP Packetization Mode: %d\n", atoi(value)); av_log(s, AV_LOG_DEBUG, "RTP Packetization Mode: %d\n", atoi(value));
...@@ -205,7 +202,6 @@ static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt, ...@@ -205,7 +202,6 @@ static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt,
total_length += sizeof(start_sequence) + nal_size; total_length += sizeof(start_sequence) + nal_size;
} else { } else {
// copying // copying
assert(dst);
memcpy(dst, start_sequence, sizeof(start_sequence)); memcpy(dst, start_sequence, sizeof(start_sequence));
dst += sizeof(start_sequence); dst += sizeof(start_sequence);
memcpy(dst, src, nal_size); memcpy(dst, src, nal_size);
...@@ -232,8 +228,6 @@ static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt, ...@@ -232,8 +228,6 @@ static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt,
if ((ret = av_new_packet(pkt, total_length)) < 0) if ((ret = av_new_packet(pkt, total_length)) < 0)
return ret; return ret;
dst = pkt->data; dst = pkt->data;
} else {
assert(dst - pkt->data == total_length);
} }
} }
...@@ -295,9 +289,6 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data, ...@@ -295,9 +289,6 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
nal = buf[0]; nal = buf[0];
type = nal & 0x1f; type = nal & 0x1f;
assert(data);
assert(buf);
/* Simplify the case (these are all the nal types used internally by /* Simplify the case (these are all the nal types used internally by
* the h264 codec). */ * the h264 codec). */
if (type >= 1 && type <= 23) if (type >= 1 && type <= 23)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment