summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-03 11:28:08 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-03 11:28:08 +0000
commitc2e8805441d06f05d81582b839d29948d76472c8 (patch)
tree14d3718cad7c16c9adaffa0d9cb79a627974d136 /libavformat
parent3bb63b822fe2c136c42538c12b77166267e13265 (diff)
remove duplicate code
Originally committed as revision 5906 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 54ccaea9f1..4c46277beb 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -812,25 +812,18 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
#endif
/* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only check EssenceContainer */
codec_ul = mxf_get_codec_ul(mxf_codec_uls, &descriptor->essence_codec_ul);
+ st->codec->codec_id = codec_ul->id;
if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
- st->codec->codec_id = codec_ul->id;
container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, &descriptor->essence_container_ul);
if (st->codec->codec_id == CODEC_ID_NONE)
st->codec->codec_id = container_ul->id;
- if (container_ul->wrapping == Clip) {
- dprintf("stream %d: clip wrapped picture essence\n", st->index);
- st->need_parsing = 1;
- }
st->codec->width = descriptor->width;
st->codec->height = descriptor->height;
st->codec->bits_per_sample = descriptor->bits_per_sample; /* Uncompressed */
} else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
- st->codec->codec_id = codec_ul->id;
container_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, &descriptor->essence_container_ul);
if (st->codec->codec_id == CODEC_ID_NONE)
st->codec->codec_id = container_ul->id;
- if (container_ul->wrapping == Clip)
- st->need_parsing = 1;
st->codec->channels = descriptor->channels;
st->codec->bits_per_sample = descriptor->bits_per_sample;
st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
@@ -847,6 +840,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
st->codec->codec_id = CODEC_ID_PCM_S32BE;
}
}
+ if (container_ul->wrapping == Clip) {
+ dprintf("stream %d: clip wrapped essence\n", st->index);
+ st->need_parsing = 1;
+ }
}
return 0;
}