aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2013-07-28 16:46:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-28 17:05:01 +0200
commitee4ef139e36193a6aa48e0d251f71dfb95e5c2cd (patch)
tree35580cca3b917534c8055285f121307fbf090b7e /libavformat/movenc.c
parent2186a7e547fdda716138444c8345ce8b823f2d4a (diff)
downloadffmpeg-ee4ef139e36193a6aa48e0d251f71dfb95e5c2cd.tar.gz
lavf/movenc: remove useless checks on AVOutputFormat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 42e7c4876e..e8e1a98dae 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3538,7 +3538,7 @@ static int mov_write_header(AVFormatContext *s)
* is enabled, we don't support non-seekable output at all. */
if (!s->pb->seekable &&
((!(mov->flags & FF_MOV_FLAG_FRAGMENT) &&
- !(s->oformat && !strcmp(s->oformat->name, "ismv")))
+ strcmp(s->oformat->name, "ismv"))
|| mov->ism_lookahead)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return -1;
@@ -3547,23 +3547,21 @@ static int mov_write_header(AVFormatContext *s)
/* Default mode == MP4 */
mov->mode = MODE_MP4;
- if (s->oformat != NULL) {
- if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP;
- else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3GP|MODE_3G2;
- else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
- else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
- else if (!strcmp("ipod",s->oformat->name)) mov->mode = MODE_IPOD;
- else if (!strcmp("ismv",s->oformat->name)) mov->mode = MODE_ISM;
- else if (!strcmp("f4v", s->oformat->name)) mov->mode = MODE_F4V;
-
- mov_write_ftyp_tag(pb,s);
- if (mov->mode == MODE_PSP) {
- if (s->nb_streams != 2) {
- av_log(s, AV_LOG_ERROR, "PSP mode need one video and one audio stream\n");
- return -1;
- }
- mov_write_uuidprof_tag(pb, s);
+ if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP;
+ else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3GP|MODE_3G2;
+ else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
+ else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
+ else if (!strcmp("ipod",s->oformat->name)) mov->mode = MODE_IPOD;
+ else if (!strcmp("ismv",s->oformat->name)) mov->mode = MODE_ISM;
+ else if (!strcmp("f4v", s->oformat->name)) mov->mode = MODE_F4V;
+
+ mov_write_ftyp_tag(pb,s);
+ if (mov->mode == MODE_PSP) {
+ if (s->nb_streams != 2) {
+ av_log(s, AV_LOG_ERROR, "PSP mode need one video and one audio stream\n");
+ return -1;
}
+ mov_write_uuidprof_tag(pb, s);
}
mov->nb_streams = s->nb_streams;