summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-08-16 22:04:53 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-08-16 22:04:53 +0200
commitd625c3b64d514882b351ae961069f657dfae49ac (patch)
tree25e330fe657850d7f97fece4ad82bed7af9d7041
parent83cb94b340055689eabe911234e9e4aa80fbfc27 (diff)
gst_video1: review comments from Tomasz Ostrowski
-rw-r--r--modules/gst_video1/encode.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/gst_video1/encode.c b/modules/gst_video1/encode.c
index 5e3a61f..8ea3735 100644
--- a/modules/gst_video1/encode.c
+++ b/modules/gst_video1/encode.c
@@ -118,7 +118,7 @@ static GstFlowReturn appsink_new_sample_cb(GstAppSink *sink,
GstBuffer *buffer;
GstMapInfo info;
guint8 *data;
- guint size;
+ gsize size;
/* Retrieve the sample */
sample = gst_app_sink_pull_sample(sink);
@@ -444,18 +444,13 @@ int gst_video1_encoder_set(struct videnc_state **stp,
" with invalid pipeline\n");
return EINVAL;
}
- }
- if (!prm && (st->encoder.bitrate != prm->bitrate ||
+ if ((st->encoder.bitrate != prm->bitrate ||
st->encoder.pktsize != prm->pktsize ||
st->encoder.fps != prm->fps)) {
- /* store new parameters */
- st->encoder.bitrate = prm->bitrate;
- st->encoder.pktsize = prm->pktsize;
- st->encoder.fps = prm->fps;
-
- pipeline_close(st);
+ pipeline_close(st);
+ }
}
st->encoder.bitrate = prm->bitrate;