diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 58096b39277932b70a6403fb9fb7f6967c04d664..e7f61cb8eec07de5e0aef9c8d85e9359aa38aa96 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -97,6 +97,11 @@ int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){
     return 0;
 }
 
+const AVClass *swr_get_class(void)
+{
+    return &av_class;
+}
+
 struct SwrContext *swr_alloc(void){
     SwrContext *s= av_mallocz(sizeof(SwrContext));
     if(s){
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 9bd5b6769db6c2f0986a7f1725e1fca633546036..3a54c8eed97200cc83c5fce637f9d9558f012d94 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -54,6 +54,14 @@ enum SwrDitherType {
 
 typedef struct SwrContext SwrContext;
 
+/**
+ * Get the AVClass for swrContext. It can be used in combination with
+ * AV_OPT_SEARCH_FAKE_OBJ for examining options.
+ *
+ * @see av_opt_find().
+ */
+const AVClass *swr_get_class(void);
+
 /**
  * Allocate SwrContext.
  *