summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_hevc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-24 23:03:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-24 23:03:12 +0100
commit29f9d82d23ffc4e48c220c68c7041ca581632981 (patch)
tree4ea28e802df1b855a415754ad05cd6b5ef0c4b04 /libavformat/rtpdec_hevc.c
parentdf38883607d256135082d76f22f4f93051dda690 (diff)
parent8633fb47db2ec39eb8bd1bd65302af75a94ff5d0 (diff)
downloadffmpeg-29f9d82d23ffc4e48c220c68c7041ca581632981.tar.gz
Merge commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0'
* 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>
Diffstat (limited to 'libavformat/rtpdec_hevc.c')
-rw-r--r--libavformat/rtpdec_hevc.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c
index b374e096a6..afabc5b67f 100644
--- a/libavformat/rtpdec_hevc.c
+++ b/libavformat/rtpdec_hevc.c
@@ -142,33 +142,7 @@ static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index,
codec = current_stream->codec;
if (av_strstart(sdp_line_ptr, "framesize:", &sdp_line_ptr)) {
- char str_video_width[50];
- char *str_video_width_ptr = str_video_width;
-
- /*
- * parse "a=framesize:96 320-240"
- */
-
- /* ignore spaces */
- while (*sdp_line_ptr && *sdp_line_ptr == ' ')
- sdp_line_ptr++;
- /* ignore RTP payload ID */
- while (*sdp_line_ptr && *sdp_line_ptr != ' ')
- sdp_line_ptr++;
- /* ignore spaces */
- while (*sdp_line_ptr && *sdp_line_ptr == ' ')
- sdp_line_ptr++;
- /* extract the actual video resolution description */
- while (*sdp_line_ptr && *sdp_line_ptr != '-' &&
- (str_video_width_ptr - str_video_width) < sizeof(str_video_width) - 1)
- *str_video_width_ptr++ = *sdp_line_ptr++;
- /* add trailing zero byte */
- *str_video_width_ptr = '\0';
-
- /* determine the width value */
- codec->width = atoi(str_video_width);
- /* jump beyond the "-" and determine the height value */
- codec->height = atoi(sdp_line_ptr + 1);
+ ff_h264_parse_framesize(codec, sdp_line_ptr);
} else if (av_strstart(sdp_line_ptr, "fmtp:", &sdp_line_ptr)) {
int ret = ff_parse_fmtp(ctx, current_stream, hevc_data, sdp_line_ptr,
hevc_sdp_parse_fmtp_config);