audio: remove initial decoding retry limitation

Seems useless.

This only helped in one case: one audio stream in the sample
av_find_best_stream_fails.ts had a AC3 packets which couldn't be
decoded, and for which avcodec_decode_audio4() returned 0 forever. In
this specific case, playback will now not start, and you have to
deselect audio manually.

(If someone complains, the old behavior might be restored, but
differently.)

Also remove the stale "bitrate" field.
This commit is contained in:
wm4 2016-01-19 22:47:18 +01:00
parent 30031edce3
commit aaafbfcc06
2 changed files with 0 additions and 11 deletions

View File

@ -35,11 +35,8 @@ struct dec_audio {
struct sh_stream *header;
struct af_stream *afilter;
char *decoder_desc;
int init_retries;
struct mp_audio decode_format;
struct mp_audio *waiting; // used on format-change
// set by decoder
int bitrate; // input bitrate, can change with VBR sources
// last known pts value in output from decoder
double pts;
// number of samples output by decoder after last known pts

View File

@ -531,14 +531,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
int r = initial_audio_decode(mpctx->d_audio);
if (r == AD_WAIT)
return; // continue later when new data is available
if (r != AD_OK) {
mpctx->d_audio->init_retries += 1;
if (mpctx->d_audio->init_retries >= 50) {
MP_ERR(mpctx, "Error initializing audio.\n");
error_on_track(mpctx, mpctx->current_track[0][STREAM_AUDIO]);
return;
}
}
reinit_audio_chain(mpctx);
mpctx->sleeptime = 0;
return; // try again next iteration