diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 02:08:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 02:08:48 +0100 |
commit | e1351662063d6aa9c0a04b869afc88b252155de8 (patch) | |
tree | e76a428240dabe9bd4b8f50d50c8bb223b1e171a | |
parent | 1a4ffa5b136a112935e7db19eb49e6042c6d5143 (diff) | |
parent | babf20a215ffdf2ecf323a77c95c2a4c4360b371 (diff) | |
download | ffmpeg-e1351662063d6aa9c0a04b869afc88b252155de8.tar.gz |
Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master:
lavd/pulse: add ff_ prefix and fix param type
lavd/pulse_audio_enc: fix flush return code
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavdevice/pulse_audio_common.c | 5 | ||||
-rw-r--r-- | libavdevice/pulse_audio_common.h | 3 | ||||
-rw-r--r-- | libavdevice/pulse_audio_dec.c | 2 | ||||
-rw-r--r-- | libavdevice/pulse_audio_enc.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/libavdevice/pulse_audio_common.c b/libavdevice/pulse_audio_common.c index bbc8c978d9..f7227f6549 100644 --- a/libavdevice/pulse_audio_common.c +++ b/libavdevice/pulse_audio_common.c @@ -19,11 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/attributes.h" -#include "libavcodec/avcodec.h" #include "pulse_audio_common.h" +#include "libavutil/attributes.h" -pa_sample_format_t av_cold codec_id_to_pulse_format(int codec_id) +pa_sample_format_t av_cold ff_codec_id_to_pulse_format(enum AVCodecID codec_id) { switch (codec_id) { case AV_CODEC_ID_PCM_U8: return PA_SAMPLE_U8; diff --git a/libavdevice/pulse_audio_common.h b/libavdevice/pulse_audio_common.h index e4409ba18b..99ba6a31f1 100644 --- a/libavdevice/pulse_audio_common.h +++ b/libavdevice/pulse_audio_common.h @@ -23,7 +23,8 @@ #define AVDEVICE_PULSE_AUDIO_COMMON_H #include <pulse/simple.h> +#include "libavcodec/avcodec.h" -pa_sample_format_t codec_id_to_pulse_format(int codec_id); +pa_sample_format_t ff_codec_id_to_pulse_format(enum AVCodecID codec_id); #endif /* AVDEVICE_PULSE_AUDIO_COMMON_H */ diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index 9cfc1447e0..639b381c34 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -57,7 +57,7 @@ static av_cold int pulse_read_header(AVFormatContext *s) int ret; enum AVCodecID codec_id = s->audio_codec_id == AV_CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id; - const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id), + const pa_sample_spec ss = { ff_codec_id_to_pulse_format(codec_id), pd->sample_rate, pd->channels }; diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index 591e518824..a2abc4aea5 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -59,7 +59,7 @@ static av_cold int pulse_write_header(AVFormatContext *h) stream_name = "Playback"; } - ss.format = codec_id_to_pulse_format(st->codec->codec_id); + ss.format = ff_codec_id_to_pulse_format(st->codec->codec_id); ss.rate = st->codec->sample_rate; ss.channels = st->codec->channels; @@ -102,7 +102,7 @@ static int pulse_write_packet(AVFormatContext *h, AVPacket *pkt) av_log(s, AV_LOG_ERROR, "pa_simple_flush failed: %s\n", pa_strerror(error)); return AVERROR(EIO); } - return 0; + return 1; } if (pkt->dts != AV_NOPTS_VALUE) |