Commit 9f8e2e92 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e4d349b4'

* commit 'e4d349b4':
  fate: h264: Add dependencies
  fate: ea: Add dependencies
  fate: Do not unconditionally run libavutil tests
  rtpenc_chain: Remove unused variable
  nuv: check for malloc failure when allocating extradata
  nuv: use the stream indices generated by avformat_new_stream()

Conflicts:
	tests/fate/ea.mak
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 52066bdb e4d349b4
...@@ -63,7 +63,7 @@ static int nuv_probe(AVProbeData *p) ...@@ -63,7 +63,7 @@ static int nuv_probe(AVProbeData *p)
* @param vst video stream of which to change parameters * @param vst video stream of which to change parameters
* @param ast video stream of which to change parameters * @param ast video stream of which to change parameters
* @param myth set if this is a MythTVVideo format file * @param myth set if this is a MythTVVideo format file
* @return 1 if all required codec data was found * @return 0 or AVERROR code
*/ */
static int get_codec_data(AVIOContext *pb, AVStream *vst, static int get_codec_data(AVIOContext *pb, AVStream *vst,
AVStream *ast, int myth) AVStream *ast, int myth)
...@@ -82,12 +82,18 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, ...@@ -82,12 +82,18 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
avio_skip(pb, 6); avio_skip(pb, 6);
size = PKTSIZE(avio_rl32(pb)); size = PKTSIZE(avio_rl32(pb));
if (vst && subtype == 'R') { if (vst && subtype == 'R') {
if (vst->codec->extradata) {
av_freep(&vst->codec->extradata);
vst->codec->extradata_size = 0;
}
vst->codec->extradata = av_malloc(size);
if (!vst->codec->extradata)
return AVERROR(ENOMEM);
vst->codec->extradata_size = size; vst->codec->extradata_size = size;
vst->codec->extradata = av_malloc(size);
avio_read(pb, vst->codec->extradata, size); avio_read(pb, vst->codec->extradata, size);
size = 0; size = 0;
if (!myth) if (!myth)
return 1; return 0;
} }
break; break;
case NUV_MYTHEXT: case NUV_MYTHEXT:
...@@ -130,7 +136,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst, ...@@ -130,7 +136,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
size -= 6 * 4; size -= 6 * 4;
avio_skip(pb, size); avio_skip(pb, size);
return 1; return 0;
case NUV_SEEKP: case NUV_SEEKP:
size = 11; size = 11;
break; break;
...@@ -151,8 +157,7 @@ static int nuv_header(AVFormatContext *s) ...@@ -151,8 +157,7 @@ static int nuv_header(AVFormatContext *s)
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
char id_string[12]; char id_string[12];
double aspect, fps; double aspect, fps;
int is_mythtv, width, height, v_packs, a_packs; int is_mythtv, width, height, v_packs, a_packs, ret;
int stream_nr = 0;
AVStream *vst = NULL, *ast = NULL; AVStream *vst = NULL, *ast = NULL;
avio_read(pb, id_string, 12); avio_read(pb, id_string, 12);
...@@ -178,10 +183,11 @@ static int nuv_header(AVFormatContext *s) ...@@ -178,10 +183,11 @@ static int nuv_header(AVFormatContext *s)
avio_rl32(pb); // keyframe distance (?) avio_rl32(pb); // keyframe distance (?)
if (v_packs) { if (v_packs) {
ctx->v_id = stream_nr++; vst = avformat_new_stream(s, NULL);
vst = avformat_new_stream(s, NULL);
if (!vst) if (!vst)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ctx->v_id = vst->index;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = AV_CODEC_ID_NUV; vst->codec->codec_id = AV_CODEC_ID_NUV;
vst->codec->width = width; vst->codec->width = width;
...@@ -198,10 +204,11 @@ static int nuv_header(AVFormatContext *s) ...@@ -198,10 +204,11 @@ static int nuv_header(AVFormatContext *s)
ctx->v_id = -1; ctx->v_id = -1;
if (a_packs) { if (a_packs) {
ctx->a_id = stream_nr++; ast = avformat_new_stream(s, NULL);
ast = avformat_new_stream(s, NULL);
if (!ast) if (!ast)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ctx->a_id = ast->index;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE; ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
ast->codec->channels = 2; ast->codec->channels = 2;
...@@ -214,7 +221,9 @@ static int nuv_header(AVFormatContext *s) ...@@ -214,7 +221,9 @@ static int nuv_header(AVFormatContext *s)
} else } else
ctx->a_id = -1; ctx->a_id = -1;
get_codec_data(pb, vst, ast, is_mythtv); if ((ret = get_codec_data(pb, vst, ast, is_mythtv)) < 0)
return ret;
ctx->rtjpg_video = vst && vst->codec->codec_id == AV_CODEC_ID_NUV; ctx->rtjpg_video = vst && vst->codec->codec_id == AV_CODEC_ID_NUV;
return 0; return 0;
......
...@@ -31,7 +31,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, ...@@ -31,7 +31,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
int idx) int idx)
{ {
AVFormatContext *rtpctx = NULL; AVFormatContext *rtpctx = NULL;
int ret, pt; int ret;
AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
uint8_t *rtpflags; uint8_t *rtpflags;
AVDictionary *opts = NULL; AVDictionary *opts = NULL;
......
...@@ -124,7 +124,6 @@ FATE_EXTERN-$(CONFIG_FFMPEG) += $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG) $ ...@@ -124,7 +124,6 @@ FATE_EXTERN-$(CONFIG_FFMPEG) += $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG) $
FATE_EXTERN += $(FATE_EXTERN-yes) FATE_EXTERN += $(FATE_EXTERN-yes)
FATE += $(FATE-yes) FATE += $(FATE-yes)
FATE += $(FATE_LIBAVUTIL)
$(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF) $(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF)
......
FATE_SAMPLES_EA += fate-ea-cdata FATE_SAMPLES_EA-$(call DEMDEC, EA_CDATA, ADPCM_EA_XAS) += fate-ea-cdata
fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be960c.cdata -f s16le fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be960c.cdata -f s16le
FATE_SAMPLES_EA += fate-ea-cmv FATE_SAMPLES_EA-$(call DEMDEC, EA, EACMV) += fate-ea-cmv
fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -pix_fmt rgb24 fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -pix_fmt rgb24
FATE_SAMPLES_EA += fate-ea-tgq FATE_SAMPLES_EA-$(call DEMDEC, EA, EATGQ) += fate-ea-tgq
fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an
FATE_SAMPLES_EA += fate-ea-tqi FATE_SAMPLES_EA-$(call DEMDEC, EA, EATQI) += fate-ea-tqi
fate-ea-tqi: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 -an fate-ea-tqi: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 -an
FATE_SAMPLES_EA += fate-ea-mad FATE_SAMPLES_EA-$(call DEMDEC, EA, EAMAD) += fate-ea-mad
fate-ea-mad: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -an fate-ea-mad: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -an
FATE_SAMPLES_EA += fate-ea-tgv-1 FATE_EA_TGV += fate-ea-tgv-1
fate-ea-tgv-1: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 -an fate-ea-tgv-1: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 -an
FATE_SAMPLES_EA += fate-ea-tgv-2 FATE_EA_TGV += fate-ea-tgv-2
fate-ea-tgv-2: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 -an fate-ea-tgv-2: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 -an
FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_EA) FATE_SAMPLES_EA-$(call DEMDEC, EA, EATGV) += $(FATE_EA_TGV)
fate-ea: $(FATE_SAMPLES_EA) fate-ea-tgv: $(FATE_EA_TGV)
FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_EA-yes)
fate-ea: $(FATE_SAMPLES_EA-yes)
...@@ -183,13 +183,15 @@ FATE_H264 = aud_mw_e \ ...@@ -183,13 +183,15 @@ FATE_H264 = aud_mw_e \
sva_nl2_e \ sva_nl2_e \
FATE_H264 := $(FATE_H264:%=fate-h264-conformance-%) \ FATE_H264 := $(FATE_H264:%=fate-h264-conformance-%) \
fate-h264-interlace-crop \
fate-h264-lossless \ fate-h264-lossless \
fate-h264-extreme-plane-pred \ fate-h264-extreme-plane-pred \
fate-h264-bsf-mp4toannexb \
FATE_SAMPLES_AVCONV += $(FATE_H264) FATE_H264-$(call DEMDEC, H264, H264) += $(FATE_H264)
fate-h264: $(FATE_H264) FATE_H264-$(call DEMDEC, MOV, H264) += fate-h264-interlace-crop
FATE_H264-$(call ALLYES, MOV_DEMUXER H264_MP4TOANNEXB_BSF) += fate-h264-bsf-mp4toannexb
FATE_SAMPLES_AVCONV += $(FATE_H264-yes)
fate-h264: $(FATE_H264-yes)
fate-h264-conformance-aud_mw_e: CMD = framecrc -vsync drop -i $(SAMPLES)/h264-conformance/AUD_MW_E.264 fate-h264-conformance-aud_mw_e: CMD = framecrc -vsync drop -i $(SAMPLES)/h264-conformance/AUD_MW_E.264
fate-h264-conformance-ba1_ft_c: CMD = framecrc -vsync drop -i $(SAMPLES)/h264-conformance/BA1_FT_C.264 fate-h264-conformance-ba1_ft_c: CMD = framecrc -vsync drop -i $(SAMPLES)/h264-conformance/BA1_FT_C.264
......
...@@ -61,4 +61,5 @@ FATE_LIBAVUTIL += fate-xtea ...@@ -61,4 +61,5 @@ FATE_LIBAVUTIL += fate-xtea
fate-xtea: libavutil/xtea-test$(EXESUF) fate-xtea: libavutil/xtea-test$(EXESUF)
fate-xtea: CMD = run libavutil/xtea-test fate-xtea: CMD = run libavutil/xtea-test
FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL)
fate-libavutil: $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL)
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