Message ID | 20161104032116.4320-1-jamrial@gmail.com |
---|---|
State | Accepted |
Headers | show |
On Fri, Nov 04, 2016 at 12:21:16AM -0300, James Almer wrote: > Signed-off-by: James Almer <jamrial@gmail.com> > --- > ffmpeg.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) LGTM thx PS: not sure ret == AVERROR(EAGAIN) should maybe be done earlier [...]
On 11/4/2016 8:13 AM, Michael Niedermayer wrote: > On Fri, Nov 04, 2016 at 12:21:16AM -0300, James Almer wrote: >> Signed-off-by: James Almer <jamrial@gmail.com> >> --- >> ffmpeg.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) > > LGTM > > thx > > PS: not sure ret == AVERROR(EAGAIN) should maybe be done earlier Good idea. Applied that instead. Thanks.
diff --git a/ffmpeg.c b/ffmpeg.c index 9809876..8c672cd 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -805,9 +805,11 @@ static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) * TODO/FIXME - Make aac_adtstoasc use new packet side data instead of changing * par_out->extradata and adapt muxers accordingly to get rid of this. */ if (!(ost->bsf_extradata_updated[idx - 1] & 1)) { - ret = avcodec_parameters_copy(ost->st->codecpar, ost->bsf_ctx[idx - 1]->par_out); - if (ret < 0) + int err = avcodec_parameters_copy(ost->st->codecpar, ost->bsf_ctx[idx - 1]->par_out); + if (err < 0) { + ret = err; goto finish; + } ost->bsf_extradata_updated[idx - 1] |= 1; } if (ret == AVERROR(EAGAIN)) {
Signed-off-by: James Almer <jamrial@gmail.com> --- ffmpeg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)