avvidenc: guard against division by zero

and other nonsensical time base values while we're at it.

Coverity 1139699
libav: avoid dividing by zero on insane fps/par

While there, fix mixup in num/den with par (copied from fps,
apparently, and fps inverts fps to time base).

Coverity 1139696
Automatic update of common submodule

From bcb1518 to 211fa5f
Release 1.3.1
Back to development
videodec: Don't use non-growable pool

As we don't know how many output buffers we need to operate, we need to
avoid pool that can't grow. Otherwise the pipeline may stall, waiting
for buffers. For now, we require it to be able to grow to at least
32 buffers, which I think is a fair amount of buffers for decoders.

https://bugzilla.gnome.org/show_bug.cgi?id=726299
Update to libav 10.1
gstavviddec: Sanitize and fix qos handling.

gst_video_decoder_get_max_decding_time doesn't return a GstClockTime
but a GstClockTimeDiff, and thus one needs to compare it against
G_MAXINT_64.

The returning of a boolean and the extra subsequent code in _video_frame
was uselessly complicated.

The previous behaviour led to artefacts when the decoder tried to
hurry up.

https://bugzilla.gnome.org/show_bug.cgi?id=730075
avvidenc: Add thread-count parameter for libav encoders

As some libav encoders (such as MPEG2) use a thread_count parameter to control
how many threads to use, and since it was always being set to 0 (which uses
the default), suboptimal threading can sometimes be chosen.  This extends the
libav encoders to allow for a max-threads parameter which is passed into
the internal structure to control this knob if applicable to the encoder.

https://bugzilla.gnome.org/show_bug.cgi?id=726612
Automatic update of common submodule

From 211fa5f to 1f5d3c3
Release 1.3.2
Back to development
avdemux: remove legacy check from pad-alloc times

The 'no_buffer' error case is from the 0.10 era when a pad_alloc was
made before decoding the data and avdemuxer could check again the
flow returns for a not-linked. This isn't a valid use case anymore in
1.0
avdemux: use GstFlowCombiner

To remove replicated code from all demuxers to a single standard way
of aggregating flow returns
avcodecmap: do more reverse mapping of MPEG4

We previously mapped some caps to MPEG4 and codec_tag so we can use the
codec_tag again to map to the original caps.
avvidenc: do all negotiation before opening the decoder

We first want to complete negotiation before opening the encoder.
Negotiation might configure flags and other things that might be needed
when opening the encoder.
avcodecmap: handle simple and advanced-simple profile in MPEG4

Always enable 4MV flag for MPEG4
Pare the profile property and enable more features for advanced-simple
profile.
video/x-xvid is advanced-simple profile so enable more features.
We now also support encoding of video/x-xvid so add this to the caps.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=651320
avvidenc: Fix indention and "bracketing" of goto labels

Should fix CID 1219865, which looks like the code analysis
algorithm was just confused.
avaudenc: avoid using wrong number of samples

If audio_in is NULL, we'll send a NULL frame to libav, to flush
the codec. In that case, we won't know how many samples the codec
will have used, so we use -1 (for don't know) when letting the
base class know about the buffer.

Coverity 1195177
avaudenc: add a comment about using -1 in _finish_frame

See https://bugzilla.gnome.org/show_bug.cgi?id=729268