History

swresample: Fix swr_drop_output so it does not flush the buffers

Michael Niedermayer committed 12 years ago

Commit e4f8a971 parent dc351e12 files · +10 −9Browse files

Showing the changes to libswresample (1 of 2 files). Show all

Unified · Split

libswresample/swresample.c+2−1
@@ -752,13 +752,14 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun · 751 unmodified lines
752}752}
753 753
754int swr_drop_output(struct SwrContext *s, int count){754int swr_drop_output(struct SwrContext *s, int count){
755 const uint8_t *tmp_arg[SWR_CH_MAX];
755 s->drop_output += count;756 s->drop_output += count;
756 757
757 if(s->drop_output <= 0)758 if(s->drop_output <= 0)
758 return 0;759 return 0;
759 760
760 av_log(s, AV_LOG_VERBOSE, "discarding %d audio samples\n", count);761 av_log(s, AV_LOG_VERBOSE, "discarding %d audio samples\n", count);
761 return swr_convert(s, NULL, s->drop_output, NULL, 0);762 return swr_convert(s, NULL, s->drop_output, tmp_arg, 0);
762}763}
763 764
764int swr_inject_silence(struct SwrContext *s, int count){765int swr_inject_silence(struct SwrContext *s, int count){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t