Skip to content

Fix 'animation' unable to detect AVConv. #8743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/users/whats_new/fix_avconv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AVConv writer is back
---------------------
Correct a bug that prevented detection of AVconv for matplotlib.animation.
6 changes: 6 additions & 0 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ def output_args(self):
def _handle_subprocess(cls, process):
_, err = process.communicate()
# Ubuntu 12.04 ships a broken ffmpeg binary which we shouldn't use
# NOTE : when removed, remove the same method in AVConvBase.
if 'Libav' in err.decode():
return False
return True
Expand Down Expand Up @@ -674,6 +675,11 @@ class AVConvBase(FFMpegBase):
exec_key = 'animation.avconv_path'
args_key = 'animation.avconv_args'

# NOTE : should be removed when the same method is removed in FFMpegBase.
@classmethod
def _handle_subprocess(cls, process):
return MovieWriter._handle_subprocess(process)


# Combine AVConv options with pipe-based writing
@writers.register('avconv')
Expand Down